Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    79

    Unhappy Unanswered: Switchboard based on user

    I am trying to load a switchboard based on the access level of a user. I read a previous post in which someone recommended putting a yesno field in a temporary switchboard table. Based on the login information, the table would then copy the appropriate switchboard items from the temp table to the switchboard table. I have attempted to do this however, my sql statement will not run.

    DoCmd****nSQL "INSERT INTO [Switchboard Items] (SwitchboardID, ItemNumber, ItemText, Command, Argument, YesNo) SELECT tmpSwitchboard.* FROM tmpSwitchboard"

    I get an error stating "can't append all the records in the append query"

    The temp table [tmpSwitchboard] was copied directly from the original [switchboard items] table. Any help would be greatly appreciated.

  2. #2
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    I use a switchboard for each access level e.g. switchboard_level1, switchboard_level2 etc. each switchboard has its own switchboard tables e.g. switchboard_level1, switchboard_level2 etc. When the user logs in successfully then the switchboard depending on the user's access level is displayed. Note if you use this method then you will need to change some code and record source for each switchboard.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Here's an example I posted: http://www.dbforums.com/6332819-post68.html

    I personally avoid the switchboard and use the getuser() routine to automatically return the user's LoginID. I then have a 'user' table which has a field telling their permission level (as the example demonstrates.) and will set buttons visible/invisible/locked/enabled depending on their permission level returned from the 'user' table.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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