Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pass The Test for a Form (97)

    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.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Pass The Test for a Form (97)

    You're reinventing the wheel, Roberta. Access security can handle this for you, including controlling what specific users or user groups can see and whether they can open the application at all.
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass The Test for a Form (97)

    Thanks for the response..... I was afraid that was going to be the response, thought I would give a try anyway.

    Have a nice day.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass The Test for a Form (97)

    Here a good link to start with user security.
    Frequently Asked Questions About Microsoft Access Security for Microsoft Access versions 2.0 through 2000
    If you have problem or questions post again.
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •