Boton Buscar en Visual Basic - Ejemplo


Private Sub Command2_Click()
 Dim Cedula
    Cedula = InputBox("Ingrese Cedula a Consultar")
    If Cedula = Empty Then
        Exit Sub
    End If
    Adodc1.Refresh
    With Adodc1.Recordset
        .Filter = ("Cedula='" & Cedula & "'")
        If Not .EOF Then
        Text1 = .Fields!Cedula
        Text2 = .Fields!Nombre
        Text3 = .Fields!apellido
        DTPicker1 = .Fields!fecha_nac
        Text4 = .Fields!telefono
        Text12 = .Fields!edad
        Combo1 = .Fields!sexo
        Combo3 = .Fields!cargo
        Text5 = .Fields!direccion
        band = 1
        Else
            MsgBox "No Existe el Registro", vbCritical
        End If
    End With
End Sub

Publicar un comentario

2 Comentarios

Emoji
(y)
:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
x-)
(k)