Where:
- Password and UserName are Fields in the tblPassword Table
- txtPassword and txtUserName are Controls on your Form
- btnSubmitPassword is the Command Button
Code:
Private Sub btnSubmitPassword_Click()
If Me.txtPassword = DLookup("Password", "tblPassword", "[UserName] = '" & Me.txtUserName & "'") Then
'Do whatever you want if Password is correct
Else
MsgBox "Password Submitted Does Not Match User Name!"
End If
End Sub
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007