Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Northern, California, USA
    Thanked 0 Times in 0 Posts

    Security: Login Conditions (97 SR2)

    I've got securities setup on my access database. Admin level users can do anything, Standard users can add/modify data, but cannot manipulate designs, and Guests can only view the application.

    I know I can create other groups and assign permissions, but can I manipulate what form they see on startup? Standard users are taken immediately to a data-entry form, I am going to setup a 'Reporting' group, that can view reports based on the data the Standard User adds. I would like to setup a switchboard for my 'reporting' users so that they can immediately get the reports they need without routing through the standard user front end. [blab][blab]

    Here's my question in a nutshell:

    Can I assign specific startup forms for specific security accounts?

    <IMG SRC=>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>

  2. #2
    Join Date
    Apr 2001
    KY USA
    Thanked 0 Times in 0 Posts

    Re: Security: Login Conditions (97 SR2)

    You could create a table of all users and there level of security (For my example the table is called "TblUsers" and has the User's name field called UserName, and the Level of Security Field called "SLev"). Create a module for routing that says something to the effect of:

    Public Sub MenuRouting()

    Dim Rst1 as recordset
    Dim MyDb as database
    Dim strSQL as string

    strSQL = "Select * from TblUsers where UserName = CurrentUser()"

    set MyDb = CurrentDb
    set Rst1 = MyDb.openrecordset(strSQL,dbopendynaset,dbseechang es)

    select case Rst1!Slev
    case is = "User"
    docmd.openform "frmUserMenu"
    case is = "Admin"
    docmd.openform "frmAdminMenu"
    end select

    docmd.closeform "frmSplashScreen"

    set Rst1 = Nothing
    set MyDb = Nothing

    end sub

    You set up a "Splash Screen" as your startup. The splash screen would have a label with your name and number/email address and a note that for support they should contact you. Put a 2 second (or less) timer event on the form. The Timer Event would be MenuRouting() which would evaluate the level of the user, then open the appropriate menu form designed for that level.

    It could possibly be done a bit cleaner than this, but this should get you what you need.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Security: Login Conditions (97 SR2)

    The general approach specified by cmotdever is the simplest. Another option would be to use a command line argument in a shortcut to start your application with a particular form or macro. However, the latter would be machine specific and/or profile specific rather than controlled by the security in your application.

Posting Permissions

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