none
Login Dialog Box in Access 2007

    Question

  • Hi,

    I need a login dialog box that will help me implement the following in access 2007:

    1. Allow users to login to the database using their unique usernames and passwords;
    2. Allow some users to access all forms, modify all forms but others to view only some forms;
    3. Allow administrators to add users and groups;
    4. Allow users to change their passwords;

    Does someone have some code which can do all or some of the above tasks.

    Thank you!

    Tuesday, July 13, 2010 12:27 PM

All replies

  • A login dialog optionally does five things only - allow a user to enter their credentials, validate those credentials, allow authorised users to proceed into the system, prevent/minimise brute force credential attacks, and record login attempts. A login dialog does not regulate access to forms, manage users/groups, or manage passwords.
     
    Security and access control can be a very complex subsystem. In general, the following is what you need, and they should be addressed separately.
     
    1. Create a security/access control schema. This generally consists of six tables:
      (a) A table for users, which includes passwords;
      (b) a table for groups;
      (c) a table for groups to which each user belongs;
      (d) a lookup table of possible permissions;
      (e) a table for permissions assigned to individual groups;
      (f)  a table to record login attempts; and
      (g) physical/logical security controls on tables, views and so on.
     
    2. Create security/access control forms:
      (a) Login dialog;
      (b) user/group management dialog (which may also include permissions);
      (c) permission management dialog; and
      (d) login audit form/report.
     
    3. Security and access control procedures.
      (a) Centralised procedures;
      (b) custom calls added to the Open event of each form to check and set rwed permissions for the form itself; and
      (c) custom calls added to other events in each form to control access to controls/data.
     
    Before we start designing anything, you need to write specifications for the type and level of security and access control you want you system to be saddled with. Sorry, but if you don't get it right now, it'll be a nightmare to do later.
     
     

    Hi,

    I need a login dialog box that will help me implement the following in access 2007:

    1. Allow users to login to the database using their unique usernames and passwords;
    2. Allow some users to access all forms, modify all forms but others to view only some forms;
    3. Allow administrators to add users and groups;
    4. Allow users to change their passwords;

    Does someone have some code which can do all or some of the above tasks.

    Thank you!


    Regards, Graham R Seach Microsoft Access MVP Sydney, Australia
    Tuesday, July 13, 2010 1:32 PM
  • You didn't say what version of Access you are using.  If you are using anything below 2007 or don't need the additional functionality of an accdb or accde database (i.e. attachments, etc.) you can use an mdb (access 2003) database and implement user level security.

    Tuesday, July 13, 2010 2:23 PM
  • I am using Access 2007.
    Wednesday, July 14, 2010 12:37 PM
  • Hi Graham,

    Didnt know it was this involving! Allow me to absorb what you have said and then come back to you after a day or so if I need more clarifications. Or better still do u know of a sample somewhere I could use? I am using MS Access 2007. Thank you.

    Wednesday, July 14, 2010 12:41 PM