Form question

  • Thread starter Highlands Mining P/L
  • Start date
H

Highlands Mining P/L

hi,

Could someone help me with this:

i have a table storing user ID's and passwords in my database and i have a
login form page. I want to take the values that the user has entered in the
text boxes (one for user id and one for password) and see if they exist in
the database. If they do, the next form should be loaded.....


thanks!
 
V

Van T. Dinh

Something like (***untested***):

If DCount("[UserID]", "[tblUser]", _
"[UserID] = '" & Forms!frmLogIn!txtUserID & _
"' AND [Pswd] = '" & Forms!frmLogIn!txtPswd & "'") > 0 _
Then

DoCmd.OpenForm...

Else
MsgBox...
'Re-try or out...

End If

HTH
Van T. Dinh
MVP (Access)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top