YOU can Convert your macros to VB, and then
Add an OK button and a Cancel button. Not sure I remember if there is a cancel button. The Cancel button code
should be a close form event
Add behind the cmdlogin button:
If me![TextPassword]<>"Your password goes here" Then
msgbox" You did not provide a valid password",VBOK
'Close the password form code goes here
'Open the desired form or do the next action desired
Now if you are trying to provide security for all users with passwords, you'll need a table users with username and password in it. and must check user name and password at login before you proceed.(See Below)
private sub cmdLogin_Click()
Dim sPswd as string
If IsNull(Me.txtUser) = True or IsNull(Me.txtPswd) = True then
msgbox "Please enter both a userid and password"
'DLOOKUP returns null if no record found therefore give it a default value of ""
sPswd = NZ(DLOOKUP("Pswd","tblUsers","UserID='" & Me.txtUser & "'"),"")
If Me.txtPswd <> sPswd then
msgbox "Invalid UserID/Password combination"
'Continue with normal successful login code
Hope I helped.