473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Switch Between Tabs in Navigation Form

68 New Member
Good day all,

Can anyone enlighten me on how to switch between tabs in navigation form? My navigation form has 5 tabs, and for some reasons I need a code to switch, between those tabs.

I have searched the web, but unfortunately nothing worked out.

Thanks
Apr 22 '12 #1
16 39955
NeoPa
32,557 Recognized Expert Moderator MVP
I don't use tabs (or Pages) much, but I suggest you do select a control found on it to switch to it. Like Sections, I'm not aware of any way to switch focus to them directly (without selecting a specific control on them).
Apr 22 '12 #2
ahd2008
68 New Member
Thanks so much for your response; I appreciate your suggestion. However, can you tell me how to do select control found or how to implement your suggestion ?

Any idea will be much appreciateled
Apr 22 '12 #3
NeoPa
32,557 Recognized Expert Moderator MVP
Rather than spelling out the details in the answer, that you should include in the question, I'll wait for some sensible details and reply using those if you don't mind. It's not fun working blind at the best of times, but completely blind because you haven't included any details in your question is not how things should be ;-)
Apr 22 '12 #4
ahd2008
68 New Member
Thanks Neopa for you kind support. Yes, you are totally right; I should have included more details.

Well, as stated in my first post I have a navigation form that has 5 tabs. The navigation form’s name is "ManageProfiles", and the tabs' names in order are:

1-EmployeesProfile
2-EvaluatorsProfile
3-MentorsProfile
4-Registration
5-WorkingSchedule

On clicking on WorkingSchedule tab, I navigate to the "WorkingSchedule Form" which is embedded in the navigation subform. It allows the user to see the schedule of each employee and their courses as well. Now, I need to write a code so when user clicks on a certain course, it switched directly to the Registration Tab, and filter through the records to bring up that particular course to allow the user to change the date.

The question now is how to switch to Registration tab?

Thanks in advance
Apr 23 '12 #5
NeoPa
32,557 Recognized Expert Moderator MVP
Much better, BUT...

If you want code to switch to the [Registration] tab, then you need to include the name of a control that is found on that tab. A SubForm control is fine, but whichever control you choose will be selected when the switch is made.

You also need to include details of what it is that will trigger the code to run. If that is a click somewhere, then the name of the somewhere must also be included. It's a good idea to indicate names within []. It's not always necessary, but it does indicate clearly what is actually the name and what is part of your text.
Apr 23 '12 #6
Mihail
759 Contributor
Expand|Select|Wrap|Line Numbers
  1. TabControlName.Pages("VBA_PageName").SetFocus
or, using pages indexes,
Expand|Select|Wrap|Line Numbers
  1. TabControlName.Value = IndexValue
Apr 24 '12 #7
ahd2008
68 New Member
Neopa Thanks for your usual support. I have tried all methods of finding a control on the [Registration] tabs, but nothing worked out. Luckly, while searching the web, I found a post in a forum similar to my case. I found out that the way to switch from one tab to another in "Navigation Forms" is to change the SourceObject of the Subform Control. So, the code to carry out this task is:

Expand|Select|Wrap|Line Numbers
  1. Forms![ManageProfiles].[SubNavigation].SourceObject = "EmployeesCourses"
Note: [EmployeesCourses] is the form embeded in Subform Control of Navigation Form.

Again, Thanks for your help
Apr 24 '12 #8
ahd2008
68 New Member
Mihail, Thanks for your inputs. I believe your codes would work with on forms based on Tab Control, but not with navigation forms.

Thanks all
Apr 24 '12 #9
NeoPa
32,557 Recognized Expert Moderator MVP
I'm confused. Your solution doesn't fit the question at all as far as I can see.

I guess (from what you have now included in your answer) that the subform control found on the tab (Page) in question is actually called [SubNavigation] (My question #1). As such, my answer would have been (due to the lack of an answer to question #2 I can't illustrate this in context) :
Expand|Select|Wrap|Line Numbers
  1. Call Me.SubNavigation.SetFocus()
It may well be that Mihail's answer, if it works, is actually a better one anyway. I was under the impression that Tab controls could not be selected directly. Possibly I was confusing this with the fact that a reference to a control within a Tab doesn't need any reference to the Tab's name in it.

If, as seems possible now, you were really after a way of changing the form that's shown within a subform on your main form, then your solution should be :
Expand|Select|Wrap|Line Numbers
  1. Me.SubNavigation.SourceObject = "EmployeesCourses"
Apr 24 '12 #10
Israel h
1 New Member
Try This:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.BrowseTo ObjectType:=acBrowseToForm, _ 
  2.                ObjectName:="EventDS", _ 
  3.                PathToSubformControl:="Main.NavigationSubform", _ 
  4.                WhereCondition:="", _ 
  5.                Page:="", _ 
  6.                DataMode:=acFormEdit
Apr 15 '14 #11
zmbd
5,501 Recognized Expert Moderator Expert
Just because this thread popped up:
A few other threads about this control - for those that come across this thread - dealing with a few different issues:
Apr 15 '14 #12
kcbehnet
5 New Member
Expand|Select|Wrap|Line Numbers
  1. Me!NavigationSubform.SourceObject = "FORM NAME"
FORM NAME = the page you want to open in the subform area of the Navigation form
Aug 23 '14 #13
zmbd
5,501 Recognized Expert Moderator Expert
kcbehnet
Me!NavigationSubform.SourceObject = "FORM NAME"
kcbehnet
You will find that only works {as expected} in a tabbed form control {the code in an ACC2010 navctrl results in a fresh reload of the subform; thus the info in the prior form is lost an as writen doesn't work from within the subform}

This will not work in the new ACC2010/newer NavigationForm Control {as one would expect. The original question was modified in post #5}

The way to move from one NavigationFormControl-tab to the other {and have the data filted as requested in post #5} is to use the "DoCmd.BrowseTo" method.

Please refer to the links as provided in my prior post for more detail about the newer ACC2010/newer NavigationForm Controls. (^_^)
Aug 25 '14 #14
twinnyfo
3,653 Recognized Expert Moderator Specialist
Z, et al,

For this reason, I started this thread: Is there any Value in NAvigation Forms?

I originally thought about posting a response to this thread, but began a new one.

Z, for you to have been frustrated understanding the new Nav Forms, I know they are not for me! I'm happy loading all my subforms at once into a Tab Control and being able to keep all my data!

:-)
Aug 25 '14 #15
kcbehnet
5 New Member
I place the following code in the Form_Load event of the Navigation form and it works.

Expand|Select|Wrap|Line Numbers
  1. Me!NavigationSubform.SourceObject = "FORM NAME"
As mentioned, I have two Navigation Controls, "NavigationControTop" and "NavigationControLeft". I am not sure if this is a tabbed form or normal navigation form as it is created automatically by selecting the Navigation Form Wizard.

I am sure I can solve the issue by means of one of the two following method:

First: if I can manage to activate the selected Navigation button in the "NavigationContyroTop".

or

Second: If I can know how to refer to the five respective groups in the "NavigationControLeft" control, with respect to the five navigation buttons in the "NavigationControTop" control.
Aug 25 '14 #16
zmbd
5,501 Recognized Expert Moderator Expert
kcbehnet:
1) Well, if you used the wizard, then you most likely have the "Navigation Control"
2) Which version of access are you using?
3) Your solution of Me!NavigationSubform.SourceObject = "FORM NAME" does work as a solution to the original question as posted in #1 - provided the controls are on the main form or in the main form events.
4) I should have been clearer in reply (I will fix that after this post}:
The original question was modified in post #5(which I most likely should merge with post number one).
Your solution is already profered in post #8; however this shows the full form reference for a control within the subform and could have been shortened to:
Parent!NavigationSubform.SourceObject = "FORM NAME"
However, this code does not answer the modified question from post #5 which was to be able to pass information from one form to the next during loading of the next form. Post 11 by "Israel h" provided the solution that allows one to easily switch navigation control tabs and pass information between them.
5) You will find issues having VBA code in the main form of a navigation form. Especially if you are using a multi-tiered form (which it sounds as if you are) as demonstrated in this thread: http://bytes.com/topic/access/answer...nt-tab-clicked
This is a known bug in ACC2010 and has not been fixed as of yet for this version. I suspect that ACC2013 suffers from this as well.
6) You will need to start your own thread for what apears to be the questions about navigating to the secondary controls.
6a) Post 11 has one answer to your questions.
Aug 25 '14 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

3
295
by: Adlai Stevenson | last post by:
For a Windows Form app, that consumes a web service. I want the option of being able to run this as a scheduled job in a batch mode. The app ( which I call XMailMan) form has two controls, a...
2
3141
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
3
1922
by: vanvee | last post by:
Hi I have an application for my company's HR department where we store resumes for candidates we receive. I have an application that uses VB.Net and ADO.Net and data bindings (through code) to...
4
1681
by: Philip Wagenaar | last post by:
I have made a form with a tab that containts groupboxes and those contain checkboxes. When I run the application sometimes the outlining for some groupboxes are not shown, if I switch tabs and...
0
1398
by: Jeff Waskiewicz | last post by:
Here is what I am trying to accomplish. I have an MDI application on the left side of the client area I have a borderless form that holds a treeveiw for navigation. When an item is selected from...
9
1732
by: pbd22 | last post by:
Hi. I am building a bit of a "learn-as-you-go" web site. I have tabs that change based on what page the user is on. The problem is, I have been using a javascript doOnLoad function to recognize...
7
3737
by: Phil Reynolds | last post by:
I'm using a tab control in Access 2000, and the user requested to have buttons in the form header, instead of the built-in tabs (so that when they scroll down, they can still switch tabs). Now,...
13
2235
by: NoaD | last post by:
Hello i have a button that clicking on it should open a pop-up with a calendar. I'm working with IE 7. the behaviour that follows clicking on the button is not persistent. if i use the mouse...
18
44425
by: AdamOnAccess | last post by:
Anyone know an easy way to toggle between Form and Design view with a hotkey? I know you can switch from Design view to Form view with hotkey F5. But is there a hotkey to switch back (from Form...
0
1988
by: araman | last post by:
Hello, I have a form and subform . The Main form contains four boxes to enter criteria for the query that fills the subform. Outside of the navigation form it works great. when i add it to the...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.