Blueice13085
asked on
ms acceess InputBox help
Below is a code i am using, what i want is the password to be in caps. and the InputBox to auto use caps as the user type in the password? also problem with the formating is it shows the password as it is type is there a way to mask this using a InputBox so as i type the password is would show *****?
Private Sub START_TIME_GotFocus()
Dim strPasswd
strPasswd = InputBox("Please Enter Admin Password", "Start Time is Restricted")
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Password Provided", vbInformation, "Password Required"
Exit Sub
End If
'If correct password is entered unlock Start_Time
'If incorrect password entered give message and exit sub
If strPasswd = "JAX" Then
Me.START_TIME.Locked = False
Else
MsgBox "Sorry, you do not have access to the start time", vbOKOnly, "Password Incorrect!"
Exit Sub
End If
End Sub
If the field is unbound, in the input mask on the data tab of the field property, type "Password" on it (without a quote).
Ed
Ed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If strPasswd = "JAX" Then
is where the password is
is where the password is
ASKER
i got how the Ucase would work in my code
Private Sub START_TIME_GotFocus()
Dim strPasswd
[b]strPasswd = UCase(InputBox("Please Enter Admin Password", "Start Time is Restricted"))[/b]
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Password Provided", vbInformation, "Password Required"
Exit Sub
End If
'If correct password is entered unlock Start_Time
'If incorrect password entered give message and exit sub
If strPasswd = "JAX" Then
Me.START_TIME.Locked = False
Else
MsgBox "Sorry, you do not have access to the start time", vbOKOnly, "Password Incorrect!"
Exit Sub
End If
End Sub
>
If your field is bound in a table, you can type the Input mask property of the field the text "Password" on it (without a quote).
Sincerely,
Ed