Hiding text for passwords

  • Thread starter Thread starter Greg Ripper
  • Start date Start date
G

Greg Ripper

Here is the code I use as a password for my Database. Basically I am trying
to keep honest people honest, as you can see by the code.

Dim sPassword As String, sAccess As String
sAccess = "admin"
sPassword = InputBox("PLEASE ENTER THE PASSWORD", "PASSWORD")
If sPassword <> sAccess Then
Cancel = True
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAdmin"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

When you type the password, however, everyone can see what you are typing.
Is there a way to hide what is being typed, with stars or something?

Rip
Rip
 
Make your own form. Create the Form in Design View and do not bind it to any table. Put a TextBox
on the form to collect the password. Set the Input Mask property of the Text Box to Password. Add
an OK Command Button (or two if you want Cancel) and add the appropriate code to process your
password.
 
Back
Top