Una famiglia di sistemi di gestione per database relazionali di Microsoft progettati per semplificare l'uso.
Ciao Rinaldo,
ok, comunque cambia poco, puoi mettere nell'evento click del pulsante di conferma questo codice
Private Sub Comando1_Click()
If IsNull(Me!user) Then
MsgBox "Inserire nome utente!!", vbExclamation
Me!user.SetFocus
Exit Sub
End If
If IsNull(Me!password) Then
MsgBox "Inserire password utente!!", vbExclamation
Me!password.SetFocus
Exit Sub
End If
Dim Db As DAO.database
Dim Rs As DAO.Recordset
Dim Login As Boolean
Dim Permesso As Variant
Set Db = DBEngine(0).OpenDatabase("C:\Users\Master\Desktop\Diritti.mdb", False, False, "MS Access;PWD=123456789")
Set Rs = Db.OpenRecordset("Tutenti", dbOpenDynaset)
Rs.FindFirst "user=""" + Replace(Me!user, """", """""") + """"
If Rs.NoMatch = True Then
MsgBox "Nome utente non trovato", vbExclamation
Else
If StrComp(Me!password, Rs!password, vbBinaryCompare) <> 0 Then
MsgBox "Password non valida!!", vbExclamation
Else
Permesso = Rs!Permesso
Login = True
End If
End If
Rs.Close
Db.Close
Set Rs = Nothing
Set Db = Nothing
If Login = True Then
'Login eseguito ...
'Istruzioni per login eseguito
'.....
End If
End Sub
Ciao
Giorgio Rancati