Results 1 to 7 of 7
  1. #1
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101

    Question Button to navigate between tabs

    Is there a way to have a button at the end of the first tab which will take the user to the next tab on clicking it?



    Is the method different for a tabbed form and the tabs on a navigation form?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You don't need a button,....the tabs are 'buttons'.
    you can use hot keys...in the tab caption, put an ampersand before the letter to become a hot key.

  3. #3
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101
    I know that one can click on the tab to switch.

    But, it will be easier for an unaccustomed user to have a button at the end of the first tab to take him to the next tab instead of scrolling up and clicking the tab. Moreover, the button will act as a reminder that the form is incomplete.

  4. #4
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529

  5. #5
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101
    Yes, that's exactly what I want! But it is not working for me!

    When I place the button, the command button wizard appears, I select Record navigation & Find next as stated. But when I try to use the button, I get this error message: You didn't specify search criteria with a FindRecord action.

  6. #6
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101
    Here is the solution for this:

    Previous button:
    Code:
     
    If Me.TabCtl0.Value = 0 Then
          Me.TabCtl0.Value = 8
       Else
          Me.TabCtl0.Value = Me.TabCtl0.Value - 1
       End If

    Next button:
    Code:
    If Me.TabCtl0.Value = 8 Then
          Me.TabCtl0.Value = 0
       Else
          Me.TabCtl0.Value = Me.TabCtl0.Value + 1
       End If
    I had 9 pages, hence I have used the number 8 (denotes 9th page) and number 0 (denotes 1st page) in the above code.

    Remember, your pages are numbered 0,1,2,3,... by access even if they are labelled as Page 1,2,3,4,...


    All credit goes to the guys who helped me out here.
    Last edited by Bradex; 03-17-2016 at 10:08 PM.

  7. #7
    Bradex is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    101
    Here is the solution for this (It works on a tabbed form):

    Previous button:
    Code:
     
    If Me.TabCtl0.Value = 0 Then
          Me.TabCtl0.Value = 8
       Else
          Me.TabCtl0.Value = Me.TabCtl0.Value - 1
       End If

    Next button:
    Code:
    If Me.TabCtl0.Value = 8 Then
          Me.TabCtl0.Value = 0
       Else
          Me.TabCtl0.Value = Me.TabCtl0.Value + 1
       End If
    I had 9 pages, hence I have used the number 8 (denotes 9th page) and number 0 (denotes 1st page) in the above code.

    Remember, your pages are numbered 0,1,2,3,... by access even if they are labelled as Page 1,2,3,4,...


    All credit goes to the guys who helped me out here.

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

Similar Threads

  1. How to navigate on tabbed form
    By JrMontgom in forum Programming
    Replies: 1
    Last Post: 09-03-2014, 12:53 PM
  2. Replies: 1
    Last Post: 12-11-2013, 11:03 AM
  3. Macro to navigate to tab or subform
    By larrydwilliams in forum Programming
    Replies: 1
    Last Post: 02-12-2012, 07:31 PM
  4. Navigate to a record in a listbox
    By jackkent in forum Access
    Replies: 4
    Last Post: 10-03-2010, 09:36 AM
  5. VBA to Navigate form
    By asmith in forum Access
    Replies: 3
    Last Post: 09-30-2010, 11:37 AM

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