I have a login form with a button on_click event where it looks up a password in a table.
If Me.txtPassword.Value = DLookup("Password", "Staff", "[LoginID]=" & Me.txtUser.Value) Then
txtPassword = password text box
txtUser = user ID ext box
Staff = table with the the following fields:
Password = the password
LoginID = the login name
However, I get a Run time error 2471
The expression you entered as a query parameter produced this error:
The error is whatever is typed in the txtUser text box.
Any hints anyone - I like to understand the DLOOKUP a bit better.
Thanks in advance.
Renoir
If Me.txtPassword.Value = DLookup("Password", "Staff", "[LoginID]=" & Me.txtUser.Value) Then
txtPassword = password text box
txtUser = user ID ext box
Staff = table with the the following fields:
Password = the password
LoginID = the login name
However, I get a Run time error 2471
The expression you entered as a query parameter produced this error:
The error is whatever is typed in the txtUser text box.
Any hints anyone - I like to understand the DLOOKUP a bit better.
Thanks in advance.
Renoir