Hiding typed text

G

Greg Ripper

I use this OnClick event to force someone to type in a password to access
a form. I know it is easily bypassed, but is there a way to his the text
being typed?

Rip

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
Rip
 
F

fredg

I use this OnClick event to force someone to type in a password to access
a form. I know it is easily bypassed, but is there a way to his the text
being typed?

Rip

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
Rip

Rip,
Not using the InputBox().

Create your own unbound form.
Add an unbound text control.
Name the control "EnterPass"
Set it's InputMask property to "Password".
Add a command button to the form.
Set it's Click event to:
Me.Visible = False
Name the form "frmPassword"

Then modify your code so that it looks like this:

Dim sPassword As String, sAccess As String
sAccess = "admin"
DoCmd.OpenForm "frmPassword", , , , , acDialog
sPassword = forms!frmPassword!EnterPass
DoCmd.Close acForm, "frmPassword"
If sPassword <> sAccess Then
Cancel = True
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAdmin"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
 

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

Similar Threads

Hiding text for passwords 1
Password protecting a form 1
Simple Password Help 1
A2000 form ceases working under A2002 1
Input box question 2
Password Prompt 1
drop down list: how to open on cursor 3
Spell Check 3

Top