Maybe check this thread out:
http://www.access-programmers.co.uk/forums/showthread.php?t=154685&highlight=password
If IsNull([cmbLogin]) Or IsNull([txtPassword]) Then
MsgBox "You must enter the correct name and/or password, please try again."
ElseIf Me!txtPassword = DLookup("Password", "tDBUser", "[DBUserID] =" & Me!cmbLogin) Then
sInitials = DLookup("Initials", "tDBUser", "[DBUserID] =" & Me!cmbLogin)
sAccessGroup = DLookup("UserGroup", "tDBUser", "[DBUserID] =" & Me!cmbLogin)
sName = DLookup("NameFirst", "tDBUser", "[DBUserID] =" & Me!cmbLogin)
sName = sName & " " & Left(DLookup("NameLast", "tDBUser", "[DBUserID] =" & Me!cmbLogin), 1)
Hey Jav .....
I am attaching a demo of user login which demos users and administrators which I wrote for Access 2007. It's purpose is to lock-down user access in the front-end because '07 doesn't have any sort of cool security features like previous versions.
This demo uses global variables so the the system can recall who is logged in (in case you want to store their name/initials in a table when they make changes) and security group level (so you can set controls and/or forms for group level access). Since it is a global variable, it will persist until changed (so they can use a form automatically without having to log into it).
To demonstrate this, it has user add/remove functions for the administrator including password reset (for a user) or change their own password. Users can only change their own password. Same form, different views depending on group level.
Note: I wrote this because this is the sort of demo I wished I could have had when first starting out to help me understand global variables, modules, and functions.
Again, this isn't a replacement for workgroup security in previous versions or ironclad security (especially for data).
-dK
Disclaimer: The posting of this demo in way holds the author responsible for its use or the security provided by its content. It is for demonstration purposes only.