Results 1 to 4 of 4
  1. #1
    manakar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    2

    Tab Control - Tab between pages

    How do I use the TAB key to move from the last field on one page to the first field in the next page? When I hit TAB it opens a new record. From what I've read, you have to use code builder but I haven't had any success yet (I have little to no experience with code building). Right now I have the "Cycle" property under the "Other" section set to "Current Record" to prevent a new record from being opened.



    The last field is called POSTAL CODE on the PERSONAL DATA page and the first field is called RACE on the PHYSICAL DESCRIPTION page.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Me.TabCtl27.Pages(2).SetFocus
    is an example, of course change names to that of your own.

    HTH

  3. #3
    manakar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    2
    Thanks so much for the code. Which event should I put on? Also, just to make sure, "TabCtl27" is replaced with the name of the "Tab Control" and "Pages(#)" stays the same? Or do I have to put the name of the page?

    Me.[Personal Data Form].Pages(1).SetFocus
    or
    Me.[Personal Data Form].[Physical Description].SetFocus

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    That's always the hard part, figuring out what event(s) to trigger code.

    Pages(#) is referencing the page by index. Index begins with 0. Use your actual tab control name.

    Try the OnExit event of the last control on the page.

    Do you have subforms on the tab pages? If so,

    Parent.TabCtl0.Pages(1).SetFocus

    If not a subform, use Me instead of Parent.
    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.

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

Similar Threads

  1. Tab Control Pages
    By Cleave_1b in forum Programming
    Replies: 4
    Last Post: 07-21-2014, 06:29 PM
  2. Anchor pages in tab control
    By snoopy2003 in forum Programming
    Replies: 2
    Last Post: 03-24-2012, 08:26 AM
  3. Blank pages between report pages
    By jonsuns7 in forum Reports
    Replies: 2
    Last Post: 10-01-2009, 05:06 AM
  4. Using tab control pages
    By queenbee in forum Programming
    Replies: 1
    Last Post: 02-28-2009, 09:43 PM
  5. Tab Control Pages
    By queenbee in forum Access
    Replies: 1
    Last Post: 02-28-2009, 10:21 AM

Tags for this Thread

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