I know how to password protect a database. What I would like to do it protect a form from specific users. In the days of old DB4 I knew how to do this. I had a table with the Users and their respective Codes and a list of all the forms. If the User had an "x" corresponding to a specific form, then user user was allowed in that form. If the "x" wasn't there the user was turned away with a msg something like "Entry Not Allowed, Please see Admin for Assistance".
I would like to do that in Access also.
What I've done so far is create the User table (tblUser). tblUser has 4 fields, indUSERID, strUserFN, strUserLN, strUserCode.
I then created another table, (tblPassTheTest). I have a couple of fields in there. indUserID, fEmpAvg, fEmpHrs, ect.
If the User, let's say, Roberta, has access to use fEmpAvg, then the field, fEmpAvg would have an "x". For the sake of this question, Roberta is allowed to user fEmpAvg but not fEmpHrs.
Now I have a couple of forms, frmEmpAvg and frmEmpHrs.
I thought about using an OpenArg for the forms, I thought about a SelectCase in the OnOpen event of the forms, but neither of these seem to be appropriate....Well actually it's me....not sure how to test if ROBERTA has an "x" in the field fEmpAvg in the table tblPassTheTest. How would I implement something to even determine it's ROBERTA opening the form then determine if she is even allowed to?
I'm open to any Suggestions, Snipetts, or Growls....
Thanks for you help.