hide password

steve111

Registered User.
Local time
Today, 21:09
Joined
Jan 30, 2014
Messages
429
hi,

this is the code I use to get the user to put the password in
how can the code be changed to hide the password when the user is inputting it
can an input mask or colour of the text be changed for when they input it

thanks steve
Code:
Private Sub Command369_Click()
 Dim strInput As String
Dim strMsg As String
 Beep
strMsg = "Please Enter  the password to allow access."
strInput = InputBox(Prompt:=strMsg, Title:="Sales Password")
If strInput = "Ollie" Then
MsgBox "Password accepted! Welcome!     " & "Ollie"
DoCmd.OpenForm "sales orders"
DoCmd.Close acForm, Me.Name
ElseIf strInput = "emma" Then
MsgBox "Password accepted! Welcome!     " & "Emma"
DoCmd.OpenForm "sales orders"
'DoCmd.Close acForm, Me.Name
Else 'password is incorrect
MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access to the ''sales form''.", vbCritical, "Invalid Password"
Exit Sub
End If
End Sub
 
I don't think so. Just don't use an input box. Use a new form. You will probably want popup and modal set to true.
 
you need a form similar to an input box, of your own design.

with a normal text box control, you can set the text box format to "password", which shows each character as a dot.


it's a pain that an input box doesn't offer the same facility.
 

Users who are viewing this thread

Back
Top Bottom