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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password a form ?

Status
Not open for further replies.

Lavey

IS-IT--Management
Jun 1, 2001
115
DE
Hi can i set a password on a command button that opens a form?

Just a quckie i hope ?!!

Cheers
 
Hi!

In the Form's Open event procedure use the following code:

Dim strPassword as String

strPassword = InputBox("Please Enter the password: ")

If strPassword <> &quot;YourPassword&quot; Then
Cancel = -1
End If

hth
Jeff Bridgham
 
Nice1, that'll do me thanks alot Jebry!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top