Login and password

B

Barb

How do I go about creating a form with Name and Password.
Then IF password is corect(I have them listed in the
little table)button at the bottom of the form would
activate.
I'm trying to filter results by name of the employee, but
I need to insert a password.

Please help
Barb
 
C

Chris

First thing I'd recommend is taking a look at security.
If this data is sensitive, then I wouldn't recommend this
method.


Otherwise,

Table: tblPassword
UserName: Text(50)
Password: Text(50)


On your form, have the button Enabled property set to
false.

Assuming you have a button to login, and txtName,
txtPassword controls:

Private Sub cmdLogin_Click()
If DCount("UserName","tblPassword","UserName = '" &
txtName & "' AND Password = '" & txtPassword & "'") > 0
Then

cmdEmployee.Enabled = True

Else

cmdEmployee.Enabled = False

End If




Chris
 
B

barb

Thanks Chris

Data is not really sensitive, what you gave me was
exactly what I needed.

Thank you
Barb
 

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

Top