Discussion Locked

Access 97, Input Box

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a way in Access 97, to use an input box to enter a password,and not have the password displayed? I am writing a VBA code to access a form that I want only persons with the password to be able to open.

9 replies

by glen_mcleod

Not by using the VBA Inputbox() function, but you can create your own password field by setting the InputMask property of a textbox to the word "Password". This creates a password-entry control. Any character typed in the control is stored as the character but is displayed as an asterisk (*)

Glen

by francodacosta

In the form load method call the password verification form
* DoCmd.OpenForm ("FrmPassWord")

This form should have its Modal and Popup properies set to True.

Then do the password verification (in FrmPassword) and use th DoCmd.Close to unload the protected form (if password is wrong)

if you need email me and i will email you an example database.

by donq

Answer 2 from francodacosta@hotmail.com
said it all and said it accurately. Clean suggestion!

by glen_mcleod

On your password form, place a text box to receive the password.

In the text box's properties, find the property "Input Mask", it's under the 'Data' tab of the property window.

Type the word "Password" (without the quotes) and hit 'Enter'. When you run the form, anything typed in will be replaces by an asterix, but you can read the contents normally via code.

Glen

This discussion is closed to new replies.