Password Issues/Spliiting Database

ahuvas

Registered User.
Local time
Today, 05:32
Joined
Sep 11, 2005
Messages
140
I followed the instructions by Microsoft for passwording a form (http://support.microsoft.com/kb/209871) but once I tried to split my database I get an error message #3219 when I try to enter the password and open my form. I know it has something to do with the code and Set rs = db.OpenRecordset("tblPassword", dbOpenTable not being valid in a split database but Im not what to do.

Anyone have an answer about what to do?
 
Last edited:
A few thoughts

These are a couple of general question to think about.
1.) Do you want to password protect the entire database or just a certain form? If it is just a form than you could use an on open procedure for that form that looks up the users permission level and if it is allowed than the button to open the form is enabled or visible. for instance:

form through which you get to the form to be protected:
on Open procedure:

if userpermission = 3 then command43.visible True else command43.visible false

This would allow you to control who can access a form by limiting who has access to the button that opens the form. userpermission would be a field that obtains the users permission level even if it isn't visible on the form. If you created user permission security accounts with the wizard you could assign people to a permission level and then have that level be passed on to the form. I have this for my db and it allows me to have a table with the user and his permissions and then all I have to do is reference that table for any commands or forms I want to restrict. Hope this gives you some ideas about how to do what you want.
Tyler:)
 
THe databased is used mainly as a computerised version of a number of psychological tests. Basically what we do is open the file on the participants computer, add the participant as a record and then open a window that has buttons to a number of forms which the participant can do at their own speed. The password are only on certain forms to stop any participant who would want to lookat other peoples info to stop them from doing that. If it was a user-level thing I would have to log in, create the participant, log out an d log in again as a different account wiht ower permission level?
 
I have another way you could password protect a form.
If you create an unbound text box that requires a password you could have a command button that requires the proper password to be entered into the box or the button to go to the form is not enabled. Example: (this code would be behind the button and the unbound text box is named text1)

if text1 = "Password" then command23.enabled = True else command23.enabled = False

The buttons enabled property would be set to enabled: no to start and only would become enabled if the proper password was put in the password box. Obviously you could have a new password be required for each form to control how far a person can go. This is an easy solution to controlling how far someone is able to go based on if they provide the proper password. You can control this by only giving them the password that will let them go through the first three forms and then they have to get a new one before the fourth form or what ever you want. You mentioned wanting to prevent someone from looking at another person's answers.

QUOTE: "The password are only on certain forms to stop any participant who would want to look at other people's info to stop them from doing that. "

When you create their account why not have an autonumber field subject record ID. Then require that their subject record ID matches the one on the form or they can't open it. This autonumber field can be hidden so that you can have a button that says my info. Behind the button's on click procedure put: docmd.openform "Form Name here",,,"[Subject Record ID= me![Subject Record ID]"

Basically you are saying open the form and filter only those records that are the same as my subject record ID.

This code will only allow you to open a form and recieve your records and nobody elses. I use this all the time when I want to filter a table for a specific person's records among thousands of others. Autonumber fields are unique identifiers so only one person can have any one number. Plus nobody has to know what their number is you just reference it to control access to only their records. Hopefully these ideas will help you with your project. Post again with any other questions and I'll try and help as much as I can

Tyler:)
 

Users who are viewing this thread

Back
Top Bottom