Results 1 to 3 of 3
  1. #1
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393

    Question Opening new Tab with command button

    Very quick question. I am using access 2010 and have created a form that has multiple tab pages. I want the user to be able to use a command button as a next button to go to next tab page. This should be easy but I cannot do it

    If I try either
    TabControl1.SelectedIndex = 1



    Or
    TabControl1.SelectedTab = TabControl1.TabPages.Item("TabPage2")

    or

    TabControl1.SelectedTab = TabControl1.TabPages.Item(1)

    I can't get it to work I can easily open forms, or many other things just not tab pages for some reason

    Thx

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Use the SetFocus method.

    TabPage2.SetFocus
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    Excellent thanks that worked great!

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

Similar Threads

  1. view size opening report from command
    By GraemeG in forum Reports
    Replies: 2
    Last Post: 06-05-2011, 05:50 AM
  2. Button not opening up associated record.
    By BenM912 in forum Forms
    Replies: 0
    Last Post: 03-15-2011, 11:28 AM
  3. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  4. Command Button
    By nashr1928 in forum Forms
    Replies: 1
    Last Post: 07-05-2010, 07:05 PM
  5. Command Button Help!
    By arthura in forum Programming
    Replies: 3
    Last Post: 06-30-2009, 12:55 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