Problem with Passwords

xMax

Registered User.
Local time
Today, 11:13
Joined
Aug 7, 2006
Messages
35
I have a password field for my database. When I enter the password, it uses the DLookUp screen to check and see if the password entered matches the correct password. However, when I use an input mask to make the password appear as astericks, it thinks the password is a bunch of astericks. When I turn the input mask off, it works. How can I get it to work with the input mask on?
 
if you are using an unbound textbox for your password set it's input mask to the word:

Password

and the astericks will come automatically for you.
 
not working. it still says the password is ******* when it is a bunch of characters and numbers. textboxes are unbound and input mask was set to password.
 
What is your code for the DLookup you are trying to use?
 
DLookup("password", "[tblLogin]", "LoginName = '" & txtLogin & "'")
 
I think you may be running up against using the word Password as a field name. Try this:

DLookup("[password]", "tblLogin", "[LoginName] = '" & txtLogin & "'")
 
Here's the code:


Dim login As Variant
Dim thepassword1 As Variant
Dim validLogin As Variant
Dim correctPassword1 As Variant
txtLogin.SetFocus
login = txtLogin.Text
txtPassword1.SetFocus
thepassword1 = txtPassword1.Text
txtLogin.SetFocus
MsgBox thepassword1 //Displays ***** as password - this is a problem
 
Instead of using variants, use actual types:

Code:
Dim login As String
Dim thepassword1 As String
Dim validLogin As Boolean
Dim correctPassword1 As Boolean
         login = Me.txtLogin 
         thepassword1 = Me.txtPassword1

MsgBox thepassword1

You don't need to set the focus if you use .Value which is the default so you don't even need to include it. If you use .Text then you need to set focus. Save yourself some coding and focus setting and just use Me.YourTextBox = "ZZZ" instead of Me.YourTextBox.Value = "ZZZ" or Me.YourTextBox.Text = "ZZZ".

If this doesn't work for you, can you post the db? See here for how:
http://www.access-programmers.co.uk/forums/showthread.php?t=140587
 
Problem Solved!!! Thank You!!! Enjoy a little rep.
 

Users who are viewing this thread

Back
Top Bottom