Private Sub Command1_Click()
If Option1 = True Then
Data1.RecordSource = "select * from Socios where Apellido = '" & Text1 & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "El apellido : '" & Text1 & "'" & " No está en la Base de Datos", vbExclamation, "¡Por Favor Revisa el apellido!"
Text1 = ""
Text1.SetFocus
End If
ElseIf Option2 = True Then
Data1.RecordSource = "select * from Socios where Número de cliente = " & Val(Text1)
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "El número de cliente : '" & Text1 & "'" & " No está en la Base de Datos", vbExclamation, "¡Por Favor Revisa el número de cliente!"
Text1 = ""
Text1.SetFocus
End If
Private Sub Option1_Click()
If Option1 = True Then
Label2.Visible = True
Label2.Caption = "Introduce el apellido que buscas"
Text1.Visible = True
Text1 = ""
Text1.SetFocus
End If
End Sub
Private Sub Option2_Click()
If Option2 = True Then
Label2.Visible = True
Label2.Caption = "Introduce el número de cliente que buscas"
Text1.Visible = True
Text1 = ""
Text1.SetFocus
End If
End Sub
Private Sub Form_Load()
MSFlexGrid1.ColWidth(0) = 300
MSFlexGrid1.ColWidth(1) = 800
MSFlexGrid1.ColWidth(2) = 2100
MSFlexGrid1.ColWidth(3) = 2500
MSFlexGrid1.ColWidth(4) = 1000
Label2.Visible = False
Text1.Visible = False
End Sub