Results 1 to 6 of 6
  1. #1
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56

    Navigation pane control!

    Hi guys, i have a db, with a log in form, made up by two tables tblusers,tbluserRights.

    tblusers has fields active,currentuser,priority



    I want to lock the navigation pane depending on the user who logged in. If the person is a adminstrator he has priority 1 which should get him access to the navigation pane.

    If the person is an agent with priority 2, the navigation pane should be locked .. any ideas on how to code this?? truly appreciated

  2. #2
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Try this:
    you must capture the the user priority and pass it on to a veriable

    Dim Priority as Integer
    Priority = "CapturedValue"

    Select case Priority
    Case 1
    'hide the navagation pane
    DoCmd.SelectObject acTable, “YourTable”, True
    DoCmd.RunCommand acCmdWindowHide
    Case 2
    'unhide the navagation pane
    DoCmd.SelectObject acTable, “YourTable”, True
    End Select

    End select

  3. #3
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    hi mate, not running though ,ere's wat i put in the Form Load Event



    Dim Priority as Integer
    Priority = 2

    Select case Priority
    Case 1
    'hide the navagation pane
    DoCmd.SelectObject acTable, “Canada Daily”, True
    DoCmd.RunCommand acCmdWindowHide
    Case 2
    'unhide the navagation pane
    DoCmd.SelectObject acTable, “Canada Daily”, True
    End Select

  4. #4
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by karanvemuri View Post
    hi mate, not running though ,ere's wat i put in the Form Load Event



    Dim Priority as Integer
    Priority = 2

    Select case Priority
    Case 1
    'hide the navagation pane
    DoCmd.SelectObject acTable, “Canada Daily”, True
    DoCmd.RunCommand acCmdWindowHide
    Case 2
    'unhide the navagation pane
    DoCmd.SelectObject acTable, “Canada Daily”, True
    End Select
    You set your "priority" to 2. Case 2 is to unhide the pane and Case 1 is to hide.

  5. #5
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    ok,is there a way tht i can pass the priority value from 'tblusers ' with the user who logged in and pass it to the varieble?

  6. #6
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by karanvemuri View Post
    ok,is there a way tht i can pass the priority value from 'tblusers ' with the user who logged in and pass it to the varieble?
    Yes, in your log in form, you probably have a code to check if the person logging in is actually a database user. From there, capture the id of the person logging in and run a dlookup in the tblUsersRight to get the priority number. Post the code for the log in form and I will give you a sample code

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Navigation Pane
    By Patrick.Grant01 in forum Programming
    Replies: 11
    Last Post: 01-08-2013, 04:55 PM
  2. Turn off Navigation Pane
    By newtoAccess in forum Access
    Replies: 9
    Last Post: 08-01-2011, 11:32 AM
  3. Navigation Pane pain
    By Felmer Dingle in forum Access
    Replies: 0
    Last Post: 06-17-2010, 11:09 AM
  4. Navigation Pane Issue
    By mimi in forum Import/Export Data
    Replies: 0
    Last Post: 02-23-2010, 01:29 PM
  5. Control navigation pane
    By ohporter in forum Access
    Replies: 0
    Last Post: 05-27-2008, 12:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums