What I'm hoping to do is be able to prompt the user of a database, only when it's first opened, for a password. Does anyone know of the easiest way to do this??
1 Close the database. If the database is shared on a network, ask all other users to close the database.
2 Make a backup copy of the database and store it in a secure place.
3 On the File menu, click Open Database.
4 Select the Exclusive check box, and then open the database.
5 On the Tools menu, point to Security, and then click Set Database Password.
6 In the Password box, type your password. Passwords are case-sensitive.
7 In the Verify box, confirm your password by typing the password again, and then click OK.
The password is now set. The next time you or any other user opens the database, a dialog box will be displayed that requests a password.
Caution
· If you lose or forget your password, it can't be recovered and you won't be able to open your database.
This is a real quick example that I hope will get you on track...
1. Create a table <tblUserList>(if one doesn't already exist) of users and passwords.
2. Create a form <frmLogin> to prompt for Name and Password. Add a command button and in the on_click event do the following:
Dim db as Database
Dim rst As Recordset
'Check for valid UserID and Password against User List
Set rst = CurrentDb.OpenRecordset("tblUserList", dbOpenDynaset)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.