Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password protection

Status
Not open for further replies.

vicktown2

Technical User
Joined
Aug 19, 2004
Messages
7
Location
CA
How can i password protect certain forms in a database without placing a password for the entire database?
 
Hi

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

Hope it helps
 
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 (*).

Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top