473,803 Members | 3,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A2003 - Tab to Tab Focus

Access 2003

I have a main form with two tab forms, one showing Client, and the
other Spouse info, each with Address tabs. When I click on the Client
address tab, I would like to have the Spouses address tab show as well.

Although the above is the primary issue to resolve, it would also be
handy to go a step further...each Address tab has a sub-form with two
tabs; Civic Address, and Mailing Address. Being able to click on the
Clients Civic address tab, and viewing the Spouses Civic Address tab
would be handy.

Any guidance would be greatly received.

Dave

Forms:

Main Form: frmMain

- Client Tab Form: TabMainClient
- Tab One: TabClient
- Tab Two: TabClientAddres ses

- sfrmClientAddre sses
- TabClientAddres ses
- TabClientCivic
- TabClientMailin g

- Spouse Tab Form: TabMainSpouse
- Tab One: TabSpouse
- Tab Two: TabSpouseAddres ses

- sfrmSpouseAddre sses
- TabClientAddres ses
- TabSpouseCivic
- TabSpouseMailin g

Jan 4 '06 #1
11 3238
I believe Forms!TabMainSp ouse!TabSpouseA ddresses.SetFoc us is very
roughly the syntax you're looking for. I'm not entirely sure about the
hierarchy of your forms...TabMain Client and TabMainSpouse are subforms
of another form? and they have their own subforms? A bit confused I am,
as usual.

You can put code in the OnClick() event of a tabpage to set the focus
to another object. Does that help?

Jan 4 '06 #2
Steve wrote:
I believe Forms!TabMainSp ouse!TabSpouseA ddresses.SetFoc us is very


I just tried your suggestion, and some variations of, but no luck I'm
afraid.

Sorry for any confusion: essentially the Main form is called frmMain
- on this form, I have two tabbed forms. The first tab manages some
general client info, and has two pages.

This tab form is called, TabMainClient; the first page is called
TabClient, and the second page is called TabClientAddres ses. On the
second page, I have a subform called sfrmClientAddre sses, which has two
tabbed pages. The first page is TabClientCivic, and the second,
TabClientMailin g.

The same setup is used for the second tab on my main form, but Spouse
is substituted for Client:

TabMainSpouse
- TabSpouse (1st tab)
- TabSpouseAddres ses (2nd tab)
- sfrmSpouseAddre sses
- TabSpouseCivic
- TabSpouseMailin g

I hope this helps to clarify the setup, although I must admit it does
sound rather confusing, much easier visually then to explain verbally.

Cheers,

Dave

Jan 4 '06 #3
In the OnChange of your TabClients control, put the following code:
Forms!frmMain.F orm!TabControlN ame.Pages(TabCl ients.Value).Se tFocus

Where (if I've got this down right) TabClients is a tab control in
sfrmClientAddre sses and TabControlName is the name of a tab control on
sfrmClientSpous eAddresses.

Jan 4 '06 #4
Sorry, just would not work...produced these error messages:

===========

Forms!frmMain.F orm!TabSpouseAd dresses.Pages(T abClientAddress es.Value).SetFo cus

Method or data method not found

===========

Forms!frmMain.F orm!TabSpouseAd dresses.Pages(T abClientCivic.V alue).SetFocus

Variable not defined

===========

I tried some variation, but no luck :-o(

Each compile error point to the (__ .Value) area

I'll try again in the AM

Thanks for your help!

Cheers,

Dave

Jan 5 '06 #5
Is TabClientCivic a tab control? Or is it a TabPage? If it is a
TabPage, replace TabClientCivic with the name of the actual tab control
it sits on.

Jan 5 '06 #6
Steve wrote:
Is TabClientCivic a tab control? Or is it a TabPage? If it is a
TabPage, replace TabClientCivic with the name of the actual tab control
it sits on.


Main Form: frmMain

All the names indicated below are the Tab Names, and then each has a
Caption. The only controls names I see are the actual fields on the
tabs...were would I look for a Tab Control Name; when I click on each
tab I only see Name and Caption?

TabMainClient (Clients Tab Form)
- TabClient (1st Tab - Client Info - Caption = Client)
- TabClientAddres ses (2nd Tab - Client Addresses, has subform w/Civic
Tab and Mailing Tab)
- sfrmClientAddre sses (Subform)
- TabClientAddres ses (Tab Form on Subform - Caption =
Addresses)
- TabClientCivic (1st Tab - Caption = Civic)
- TabClientMailin g (2nd Tab - Caption = Mailing)

Same naming concept for the Spouses tabs:

TabMainSpouse (Spouses Tab Form)
- TabSpouse (1st Tab - Spouses Info)
- TabSpouseAddres ses (2nd tab)
- sfrmSpouseAddre sses (Subform)
- TabSpouseCivic (1st Tab)
- TabSpouseMailin g 2nd Tab)

Jan 5 '06 #7
All right, this is a bit hard to explain. TabSpouseCivic is a TabPage.
A TabPage sits on a Tab control. You can find out the name of the Tab
control your TabPage sits on by clicking the blank grey area to the
right of the second TabPage (TabSpouseMail) tab, where the caption is,
and going to View | Properties. The Properties box will display the
name of the Tab control. Once you have that name, use this syntax:

Forms!frmMain.F orm!TabControlN ame.Pages(TabCo ntrolNameHERE.V alue).SetFocus

Jan 5 '06 #8
Hi Steve; I followed your instructions at tried the following, but the
following error message popped up..."Method or data method not found",
and when to the code...".Value" .

Forms!frmMain.F orm!TabMainSpou se.Pages(tabCli ent.Value).SetF ocus

and if I try it this way:

Forms!frmMain.F orm!tabClient.P ages(TabMainSpo use.Value).SetF ocus

this is the error message: Error: Run-time error 438 - Object doesn't
support this object of method.

I'm wondering if this is worth it...long day :-o(

Dave

Jan 5 '06 #9
I suspect that tabClient and TabMainSpouse are TabPages and not actual
tab controls (TabPages do not have a Value property). I think once you
find out the tab control names you'll be home free.

Suggestion #1: The default name for tab controls starts with "Ctl0" and
increments. So the first tab control you place on the form is Ctl0, the
second is Ctl1, third is Ctl2, etc. You could try substituting these
names for "tabClient" and "TabMainSpouse" .

Suggestion #2 (more useful because you learn something): Follow these
steps:
1. Create a new form (Form1).
2. On that new form, draw a tab control object. It should appear with
two pages (Page 1 and Page 2) by default. Its name will be Ctl0 by
default. Make the tab control as wide as the form is.
3. At the top of the tab control, to the right of the tab bearing the
caption "Page 2", do you see the blank grey area? It is as tall as the
tabs and as wide as the form. It's kind of hard to see right away, but
it's there.
4. Click on that blank grey area. In the property sheet, look at the
Name property in the Other section. That is the name of your tab
control. RIght now, it should say Ctl0. If it says anything that
doesn't start with Ctl, you haven't selected the right part of the tab
control.

The hierarchy of a tab control with TabPages looks like this (use your
imagination):

---------------
TabPage1, TabPage2, etc
---------------
Tab control (holds all the TabPages)
----------------

So a tab control can have many TabPages, but a TabPage can have only
one tab control. Is that a bit more clear? Once you are able to see the
tab control as opposed to just the TabPages, I think it will make a lot
more sense to you.

Jan 5 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1696
by: -Michelle- | last post by:
Hi I am using A2003 on XP. The client has A2000. So I have ensured that I have developed based on A2000 and compiled as such. I have found that in a number of cases now, I have used (what I thought) was fairly standard methods & properties, but as it turns out, not so. I install on the client's machine and recompile and have found that a method is just not recognised in A2000. eg: in A2003, docmd.OpenReport includes the 'OpenArgs'...
4
3144
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the background colour. In A2000 it works great, but in A2003 the background doesn't always change and when it does it only changes when the record looses the focus. Any way around this? Is it a bug? Or have they "improved" it?
12
2216
by: dixie | last post by:
Can someone familiar with Access 2003 please answer this question? I am asking because I don't have the use of A2003. When Access 2003 finds an Access 2000 database, does it come up with some sort of question/suggestion indicating that you can convert this datbase into the new format? I am trying to trouble shoot a remote site where a big error message indicating the database was converted using the wrong method comes up when they try to...
1
1534
by: Paul Brady | last post by:
I have A97 and A2K on my computer at home, on which I do volunteer work for several databases on our county park system. One of the clients uses A97, and the rest, A2K. The A97 user is considering upgrading their Microsoft Office. If they upgrade to Office 2000, I have no problems; I'll convert their A97 database and we'll be in business. But what if they upgrade to Office 2003 (I think there is such a thing) and install A2003. Will I...
17
3158
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 - Access 2000; folder with back-ends for both computers and 'Update' folder. I have a launcher program that launces my application (MyApp). The launcher program also checks for updates to MyApp located in 'Update' folder (on
7
3064
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro 2.0;HDR=NO;IMEX=2;DATABASE=C:\Test It's really easy to connect to those tables in A97. I'm having difficulties in A2003. I'm trying to follow the instructions in http://support.microsoft.com/kb/824264/.
1
1529
by: Fred Zuckerman | last post by:
I have a database on a shared drive. It has user level security (ie: mdw file). It was created in A2000 and works fine when opened on workstations with A2000 installed. Some workstations have A2003 installed. On those workstations there is an unbound form that continually gives the un-useful message: "Microsoft Access Has Encountered A Problem And Must Shutdown, We're Sorry For The Inconvenience"
1
1621
by: Wayne | last post by:
I've found a painful bug when running an Access 2003 database under Access 2007. It manifests in both XP and Vista. Some combo boxes on some forms become transparent when they lose focus. It seems to be completely random as to which combo boxes on which forms are affected. I've tried importing the forms into a new A2007 database, but the bug persists. It seems that if the forms were created in A2003 they have the potential to...
2
2245
by: Wayne | last post by:
I'm trying to overcome the problem that some users including myself have noticed with combo boxes in A2003 databases that are run in A2007. When the combo is tabbed out of the backstyle changes to transparent. I haven't yet seen a fix for this. If I design in A2003 now and then run the DB in A2007 in future the combo box problem may arise. What I have thought of doing is designing in A2007 and then compiling in A2003 for my current...
0
9700
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, 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...
0
9564
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,...
0
10546
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10292
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9121
agi2029
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...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6841
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();...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
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 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.