Password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a form that contains confidential data, on the action of "Onload"
,i put the following code to oblige the one who wants to open it to put a
password:
Private Sub Form_Load()
Dim A
For r = 1 To 3
A = InputBox("Enter password")
If A = "24/04/2006" Then Exit Sub
Next r

MsgBox ("You are not authorized to open this page")
DoCmd.close
End Sub

It works very well,but when i type the password ,it appears like this :
24/04/2006
While i need help to make it appear like this : **********

Regards
 
You can't do it using an InputBox.

The only way to replace what's typed into the box with asterisks is to use a
text box that has its InputMask set to Password. You can put this text box
on the same form, or (far better) you can put it on a separate form, pop
that form up when you need to know the password, and pass what was typed
back to your calling form.
 
You cannot set asterisks in an inputbox. To do this, you'll need to create a
new form with a textbox and a command button. In the textbox's InputMask
property, type Password. This will display asterisks.

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top