home

Security: Form For Adding/Deleting Users and Handling Passwords on One Form

Tuesday, June 17, 2003 20:12:48

The scenario: you've designed a database for a supervisor who has a few employees working under them. The list of employees could change. Also the employees may need their password changed if they forget it or want it changed. This supervisor wants to be able to do this, but you don't want to make them a full-blown adminstrator and distribute an MDB file to them rather than the MDE file you normally do. On top of that, they likely won't be able to figure out the default Access menus which handle security. They won't know which group to add the users to, etc. How do you enable them to administer adding/deleting users and changing their passwords, with them still not having typical Administrative rights to the entire database?

This form, shown to the right, handles this very scenario and, frankly, is the ultimate. It allows you to:

  • Change the permissions of the selected user. You can add a group from the "available" list and add it using the + button; you can remove a group by selecting it from the "granted" list and clicking the - key
  • Delete the selected user
  • Change or remove the password of the selected user
  • Add a new user, and specify then the permissions they should be granted
  • Notice, too, it shows the path of your linked tables and the workgroup file in use

    Notice: anyone who can open this form will gain this ability even if they're not an administrator; make sure in your security you only allow users to a restricted group entitled something like "JrAdmin" permissions to open/run the form.

    You can easily download the database below, which you can then import into your database and use pretty much right away with little modification; the main modification would be to the combo box which contains the specifications for the groups you would join the user to. (Be sure to import the modules too.)

    Download the template for your use.
    (Access 2000 & up)