login form

S

sherry

I want to create a login form having two fields "username" and password, and a submit button, I created a password table where i store the usernames and password. I want to know how i can check the username and password from the table.
 
L

Lynn Trapp

Sherry,
Why reinvent the wheel? User Level security in Access is already set up to
accomplish that for you. Read the Security FAQ several times and follow it
to the letter. There is a link to it on the Security page of my website.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


sherry said:
I want to create a login form having two fields "username" and password,
and a submit button, I created a password table where i store the usernames
and password. I want to know how i can check the username and password from
the table.
 
S

Sherry

Thanks Lynn, I have read the user level security but the problem is that i have 4 access database on the share drive and i want to create the login for only one access database but if i use the user level security it transfer to other databases as well, thats why i want to create a simple user login form where user can enter their user name and password. At the moment i am trying to use this cod

If Me.txtPassword.Value = DLookup("EmpPassword", "tblEmp", "[EmpId]=" & Me.txtEmpId.Value
but for some reason it is not workin

if you can hel
thanks
 
J

Joan Wild

Sherry said:
Thanks Lynn, I have read the user level security but the problem is that i
have 4 access database on the share drive and i want to create the login for
only one access database but if i use the user level security it transfer to
other databases as well

You can use the workgroup administrator to rejoin the standard system.mdw.
That will be used for all sessions of Access. When you want to start your
one secured mdb, use a desktop shortcut that points to the secure mdw to use
for just that session. The target would look like

"path to msaccess.exe" "path to mdb" /wrkgrp "path to secure mdw"
 
R

Rick B

You would have to post your code and tell us what error.

Be aware that the road you are going down will NOT secure your database
properly. Anyone at all Access-savy will be able to get around your code.
Users might even be able to look at other peoples' passwords.

Very bad idea.

Rick B


Thanks Joan,
but can any one tell me what is the problem of my code, it seems ok but it
gives me an error 2001.
Regards
 

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