Ithink I got it now
Code:
If DLookup("CategoryID", "tblUser", "[strPassword]=" & Me.txtPassword.Value) = "OB01" Then
Your Dlookup value
DLookup("username", "tblUser", "[strPassword]=" & Me.txtPassword.Value
I think you must using that code on the comand button at the login form and the login form will oppened the form, let the form check it by it self are the user have the the permision to accesing it.
on load event the form will open, to check are the user have Correct Identity to acces the form I think you should wrote a VBA code again
Code:
If DLookup("Username", "tblUser", "[CategoryID]='OB01'" Then
msgbox "You are authorized",Vbokonly,"app name"
else
msgbox "Sorry .. ,You are not authorized",Vbokonly,"app name"
Docmd.close
end if