Visual Basic - Ayuda Por favor

Life is soft - evento anual de software empresarial
 
Vista:

Ayuda Por favor

Publicado por mary (58 intervenciones) el 23/05/2007 22:01:58
Hola, estoy realizando un sistema, en el que tengo en una forma un flexgrid, yo quiero que al yo ir escribiendo en un textbox me vayan apareciendo en el flexgrid los registros que comienzan con esa letra o numero. Hasta ahora solo me aparece si coloco el numero completo.
Este es el codigo que tengo:

Private Sub txtNum_Circuito_Change()
Dim db As ADODB.Connection
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Confid;DataSource=."
db.Open
If txtNum_Circuito.Text <> "" Then
sql = "SELECT Num_Circuito,Proveedor,CIR,Agencia,Num_Agencia,Velocidad,Estado,DLCI,Fecha_Instalacion FROM Enlaces WHERE Num_Circuito='" & txtNum_Circuito & "'"
Set rs = db.Execute(sql)
With MSFlexGrid1
.CellAlignment = 9
X = 0
Do While Not rs.EOF
X = X + 1
.TextMatrix(X, 0) = rs!Num_Circuito
.TextMatrix(X, 1) = rs!Agencia
.TextMatrix(X, 2) = rs!Num_Agencia
.TextMatrix(X, 3) = rs!Proveedor
.TextMatrix(X, 4) = rs!DLCI
.TextMatrix(X, 5) = rs!CIR
.TextMatrix(X, 6) = rs!Velocidad
.TextMatrix(X, 7) = rs!Fecha_Instalacion
rs.MoveNext
Loop
End With
End If
End Sub

Por fa ayudenme
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Ayuda Por favor

Publicado por CSO (3 intervenciones) el 23/05/2007 23:53:28
¡¡¡ Q casualidad ..jjejej ¡¡¡ Tengo otro programa ejemplo, q conforme escribes en un texbox, la base de datos te busca y muestra en el flexgrid los registros q empiezan por cada letra q tu pones ej si pones..c... te muestra todos los registro q empiezan por c...si añades ...ca.. idem de lo mismo..y asi sucesivamente.
si te interesa mañana noche te lo envio.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda Por favor

Publicado por mary (58 intervenciones) el 24/05/2007 14:40:07
Ay muchas gracias, no se que paso pero no pude abrir el otro ejemplo q me enviaste. por fa podrias enviarmelo de nuevo? o dime en que programa puedo abrirlo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda Por favor

Publicado por Javi (16 intervenciones) el 05/06/2007 09:45:22
mary, yo ando buscando lo mismo, como lo hiciste?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar