Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MS Access 2013 Control Button to Navagate Tabs

Posted on 2013-12-20
3
Medium Priority
?
758 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

New style of hardware planning for Microsoft Exchange server.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

610 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