Show asterisk in password field

AbeA

Registered User.
Local time
Yesterday, 19:44
Joined
Dec 21, 2006
Messages
28
I have switchboard that contains command buttons to access many forms. I have locked down the forms via password using the following code for each form:

Dim PassWord As String
PassWord = InputBox("Enter Password")
If PassWord = "MyPassword" Then
' Open Form
DoCmd.OpenForm "MyFormName"
DoCmd.GoToRecord , , acNewRec
Else
MsgBox ("You're not authorized")
End If


It WORKS fine, but when you enter the password, it shows the actual letters rather than an asterisk. How would I go about showing asterisks instead?

Thanks!
 
Without an API (lots of coding) you can't mask an InputBox. Create your own form and set the text box's InputMask property to Password.
 
I have switchboard that contains command buttons to access many forms. I have locked down the forms via password using the following code for each form:

Dim PassWord As String
PassWord = InputBox("Enter Password")
If PassWord = "MyPassword" Then
' Open Form
DoCmd.OpenForm "MyFormName"
DoCmd.GoToRecord , , acNewRec
Else
MsgBox ("You're not authorized")
End If


It WORKS fine, but when you enter the password, it shows the actual letters rather than an asterisk. How would I go about showing asterisks instead?

Thanks!

Create a textbox on a form and set the format as PASSWORD. You cannot EASILY set the Inputbox function to mask a password. It can be done but requires several API calls and a fair amount of code, search the forum/google for Masked Inputbox and you should come up with some examples if you really want to do it.


-Dang Bob's too fast, beat me to the punch.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom