?
Solved

MS Access 2013 Control Button to Navagate Tabs

Posted on 2013-12-20
3
Medium Priority
?
748 Views
Last Modified: 2013-12-24
I have a Main Form with several Navigation Tabs attached to it (tabs are hidden).  It's important that I use a Control Button on each tab/form ('Next') to dictate which tab/form to display next.  The order of the tab/forms to be displayed is not necessarily consecutive (1, 2, 3, 4...), but rather, depends on selections made on Option Groups embedded within each tab/form.  

Question1:  Does anyone have a code I can use within my Control Buttons to say "If clicked, display next tab/form?"

Question 2:  Does anyone have a code I can use within my Control Buttons to say "If clicked-- and based on this Option Group Selection, open this tab/form?

Any help would be much appreciated.  *Apologies, but be as basic/hand-holding as possible in your wording—I’m a total Access rookie!
0
Comment
Question by:mdstalla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1500 total points
ID: 39733060
it will help if you upload a copy of the db, so we can see what kind of control you actually have.

a good combination for this type of setup is Tab Control and Option Group with Toggle buttons.


using the AfterUpdate event of the Option Group

private sub frame0_afterupdate()

select case me.frame0
      case 1
          me.tabctl0.pages(0).setfocus
      case 2
          me.tabctl0.pages(1).setfocus


end select

end sub


or use the name of the tab


private sub frame0_afterupdate()

select case me.frame0
      case 1
          me.tabctl0.pages("page1").setfocus
      case 2
          me.tabctl0.pages("page2").setfocus


end select

end sub
0
 
LVL 21
ID: 39734178
I have created similar "Wizard" style forms that work like what you need.

I have a a working example that should help:

Wizard Form template
This database has a form that uses a tab control to create a wizard style look. The tabs are hidden. There an back/next command buttons to navigate between the tab control's pages.

** Updated 1/9/2010 to handle an issue with Access 2010.
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 39735899
Besides code like Capricorn1 suggests above, I assume you are going to need "Back" buttons as well, so you need to keep track of the previous tab you were on.

I generally do that in an array

When you click the "Next" button, save the current tab number in an array and use an array pointer variable to keep track of where you are in the array.  Then move on to the next tab using code similar to Capricorn1's above.

Then, if the user clicks Back instead of next, you can use the pointer to determine the appropriate element of the array and go to that tab.  Reminder, when you move back, don't forget to decrement the value of your array pointer.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question