1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Private Sub Commande4_Click()
Me.Requery
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("T_User", dbOpenDynaset)
Dim check As Boolean
check = False
Do Until rst.EOF
If (rst!id = Me.Modifiable5.Value) And (rst!pswd = Me.Texte2.Value) Then
check = True
Exit Do
End If
rst.MoveNext
Loop
If check = True Then
DoCmd.OpenForm "Ajouter", acNormal
Else
MsgBox "LOGIN OU MOT DE PASSE INCORRECT ! CONTACTEZ L'ADMINISTRATEUR", vbInformation, "Connexion"
Me.Texte2.SetFocus
End If
rst.Close
Set rst = Nothing
End Sub |
Partager