Need help accessing different forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bearmstrong
    New Member
    • May 2006
    • 1

    Need help accessing different forms

    Here's what i need to do, keep in mind that I'm new to access and have learned coding is the same as excel.

    I have 2 different types of users, those that are users and those that are admin. I have 2 different forms, the user form allows users to see thier data and add to it. the admin people have a different form that allows them to see all records and edit delete and so on.

    here's how it flows.

    login form takes them to startup form, which just tells them things are loading, then I want that form to direct them to either

    frmswitchboardu ser for the users or
    frmswitchboard for the admin.

    I have been looking at all kinds of dlookup code but can't seem to find what i need.. Thanks for any help

    Bad Bruce
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Originally posted by bearmstrong
    Here's what i need to do, keep in mind that I'm new to access and have learned coding is the same as excel.

    I have 2 different types of users, those that are users and those that are admin. I have 2 different forms, the user form allows users to see thier data and add to it. the admin people have a different form that allows them to see all records and edit delete and so on.

    here's how it flows.

    login form takes them to startup form, which just tells them things are loading, then I want that form to direct them to either

    frmswitchboardu ser for the users or
    frmswitchboard for the admin.

    I have been looking at all kinds of dlookup code but can't seem to find what i need.. Thanks for any help

    Bad Bruce

    In your form for login in the login bouton you need to create an After Update Event:

    I which you have to verify is the user is admin or no

    If (he/she is admin) then
    DoCmd.OpenForm "AdminSwitchboa rd", A_NORMAL, , , A_EDIT, A_NORMAL
    else
    DoCmd.OpenForm "UserSwitchboar d", A_NORMAL, , , A_EDIT, A_NORMAL
    end if

    Have a nice day!

    :)

    Comment

    Working...