I'm missing something in this process. When I run the code below, I get a "Runtime Error 3061: Too Few Parameters. Expected 2". This module runs after users key in their ID and Password. The query "qryUserValidate" runs based on this form. Maybe I have to open this query???
Function logon()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("qryUserValidate")
If rs.RecordCount > 0 Then
DoCmd.Minimize
DoCmd.OpenForm "Main Menu"
Else
MsgBox "User ID or Password not Valid", vbOKOnly, "Warning"
End If
rs.Close
Set db = Nothing
End Function
Function logon()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("qryUserValidate")
If rs.RecordCount > 0 Then
DoCmd.Minimize
DoCmd.OpenForm "Main Menu"
Else
MsgBox "User ID or Password not Valid", vbOKOnly, "Warning"
End If
rs.Close
Set db = Nothing
End Function