Results 1 to 5 of 5
  1. #1
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97

    Select start view tab in multitabbed form


    Hello,
    is there any solution to choose the tab in a multitabbed shown at startup according to the user who opens a user-level secured .mdb ?
    Thx

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Yes, each tab in your tab control has a name if you go to a field on a specific tab your form will automatically choose that tab to start on.

  3. #3
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    Thanks for the hint. Is the following if statement ok ?

    If CurrentUser() = x Then
    Me.y.SetFocus
    End if

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I don't know how your database is set up but if you have a function called currentuser that returns a permission variable then that might work though I prefer a specific

    docmd.gotocontrol ("FieldName")

    Access will find the field on the appropriate tab and go to that field

  5. #5
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    Thanks a ton rpeare. CurrentUser() is an intrinsic function of Access (at least 2007 on), just like Now(), so there is no need to create it. And yes, [tab element name].SetFocus works like a charm using a "Select" statement (more suitable than "If" statement since my workgroup has multiple users) in the OnLoad event for the tabbed form. Thanks again.

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

Similar Threads

  1. Replies: 3
    Last Post: 02-22-2011, 04:50 PM
  2. Replies: 1
    Last Post: 10-24-2010, 11:32 AM
  3. Start form on opening database
    By Ted C in forum Forms
    Replies: 2
    Last Post: 08-10-2010, 08:00 PM
  4. Start Form
    By Patrick.Grant01 in forum Access
    Replies: 3
    Last Post: 05-17-2009, 03:29 PM
  5. Replies: 9
    Last Post: 03-24-2009, 09:19 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