I would use a the following in the on click event of the button that launches the forms you want to protect.
Dim strPword As String
Dim stDocName As String
stDocName = "Form Name"
strPword = InputBox("Enter Password", "Edit Locked")
If strPword = "" Then
GoTo Exit_command name
End If
If strPword = "your password" Then
DoCmd.OpenForm stDocName, , , ,
End If
However, rather than using an input box, I'd create a small popup form because, with an input box, you cannot format the text to display the password character (*).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.