Visual Basic - COMO BUSCO EN UN MSFLEXGRID?

Life is soft - evento anual de software empresarial
 
Vista:

COMO BUSCO EN UN MSFLEXGRID?

Publicado por Héctor (37 intervenciones) el 20/06/2002 19:06:37
Hola a todos y gracias por la ayuda.
En un msflexgrid tengo un listado de clientes(numero, razon social), necesito hacer una especie de buscador, cuando pongo la primer letra en un text.text, que me muestre en la grilla todos los que empiezan con esa letra, o sea quiero que esos nombres me queden a la vista para poder seleccionarlos, solo que se mueva el cursor hasta ahi.
Espero que me haya explicado bien.
Saludos
Héctor
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:COMO BUSCO EN UN MSFLEXGRID?

Publicado por carla (104 intervenciones) el 20/06/2002 23:55:50
MIRA YO TRABAJO CON ESA GRILLA Y NO HACE ESO HAY OTROS CONTROLES QUE SI LO QUE TENDRIAS QUE HACER TU ES UAN FUNCION PARA QUE TE BUSQUE UNA IGUALDAD O ALGO ASI

Sub bus_nombre_GotFocus()
bus_nombre.BackColor = Celeste
bus_nombre.ForeColor = Negro
bus_nombre.SelStart = 0
bus_nombre.SelLength = Len(bus_nombre)
End Sub
Private Sub bus_nombre_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii <> 13 Then
Exit Sub
End If
Sw_materia = False

busca_nombre
If Not Sw_materia Then
MsgBox "Cliente no Encontrado", 16, "Error en Busqueda"
grilla2.SetFocus
bus_nombre.SetFocus
Exit Sub
End If
Exit Sub

End Sub
Private Sub bus_nombre_LostFocus()
bus_nombre.BackColor = Verde
bus_nombre.ForeColor = Blanco
End Sub

Private Sub busca_nombre()
MousePointer = Default
I = 1
strin = 0
Do While I < grilla2.Rows - 1
grilla2.Row = I
grilla2.Col = 2
strin = InStr(1, grilla2.Text, bus_nombre, 1)
If strin > 0 Then
Sw_materia = True
grilla2.Col = 1
grilla2.TopRow = I
Exit Do
End If
I = I + 1
Loop

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