Dim flagcierre As Boolean
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If flagcierre = False Then
Cancel = 1
End If
End Sub
Private Sub miboton_Click()
flagcierre = True
End
End Sub
Private Sub Continuar_Click()
Dim ls_SQL As String, ls_clave As String, SearchStr$
SearchStr$ = Text1.Text
datEmp1.Recordset.Index = "Usuario" 'usa Nombre Clase
datEmp1.Recordset.Seek "=", SearchStr$ 'y busca
If datEmp1.Recordset.NoMatch Then 'si no encuentra ninguno
MsgBox ("error usuario")
End If
ls_clave = "Select clave from empleados.clave where usuario = Text1.text"
If ls_clave = Text2.Text Then
ls_SQL = "Select tipo from empleados.tipo where usuario = Text1.text and clave = Text2.text "
Else
MsgBox (ls_clave)
MsgBox (Text2.Text)
End If
End Sub
Private Sub Salir_Click()
End
End Sub