473,854 Members | 1,814 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.

Apr 22 '12 #1
16 40050
32,584 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
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
32,584 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
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-EmployeesProfil e
2-EvaluatorsProfi le

On clicking on WorkingSchedule tab, I navigate to the "WorkingSchedul e 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
32,584 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
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
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: [EmployeesCourse s] is the form embeded in Subform Control of Navigation Form.

Again, Thanks for your help
Apr 24 '12 #8
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
32,584 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

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

Similar topics

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 FileOpenDialog and a submit button. When you press submit, the FileOpenDialog appears, you select an Xml file. It is then parsed in an XmlReader and loaded into an
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 a form which displays the information from the table. The end users have access to the form only - this is deliberate. I have created some queries, including parameter queries, to aid them which are accessible via buttons on the main form. ...
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 controls on a Windows form. The question I have is that once the database grows and contains a large number of records, I am worried the dataset is going to create too much overhead when the user clicks "show all records" (the full resume which...
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 back sometimes all outlining is shown and sometimes are not shown. I have no idea what is going wrong. What also is weird is that when I open the form from my main application I can resize the form, even though it is locked, and that when I cut...
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 the treeview it opens a seperate form. Similar to an MDI Windows Explorer. Now, I want to prevent any for form from being moved into the area occupied by the navigation form. I used the following code do do that... Private Sub...
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 the page the user is on and, then, provide the correct tabs. This depends on a normal URL, such as http://www.mysite.com/index.html. But, as I build the site, I am learning that there are times when all
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, this works fine. However, when I'm in Design View, I can't access the tabs without changing the tab control's Style back to Tabs. But I want to be able to place controls in that space at the top where the tabs used to be. But if I need to turn the...
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 to click the button i succeed, but when i navigate with tabs, sometimes it works right away, sometimes it needs 1-2 tries to open the window, and sometimes it doesn't succeed. the problem is that window.open(...) returns null
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 view to Design)? Shift-F5 is not it. I've searched Google and I can't believe I couldn't find an answer. Please help. Adam
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 navigation form on open the access paramter box pops up asking for criteria instead of just letting me enter it on the form. Is there a problem using this type of form in a navagation form. SQL for Query: SELECT Orders., Orders., Orders.Received,...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
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 we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.