Form question

  • Thread starter Thread starter Highlands Mining P/L
  • Start date 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!
 
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)
 
Back
Top