473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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: TabClientAddresses

- sfrmClientAddresses
- TabClientAddresses
- TabClientCivic
- TabClientMailing

- Spouse Tab Form: TabMainSpouse
- Tab One: TabSpouse
- Tab Two: TabSpouseAddresses

- sfrmSpouseAddresses
- TabClientAddresses
- TabSpouseCivic
- TabSpouseMailing

Jan 4 '06 #1
11 3199
I believe Forms!TabMainSpouse!TabSpouseAddresses.SetFocus is very
roughly the syntax you're looking for. I'm not entirely sure about the
hierarchy of your forms...TabMainClient 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!TabMainSpouse!TabSpouseAddresses.SetFocus 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 TabClientAddresses. On the
second page, I have a subform called sfrmClientAddresses, which has two
tabbed pages. The first page is TabClientCivic, and the second,
TabClientMailing.

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

TabMainSpouse
- TabSpouse (1st tab)
- TabSpouseAddresses (2nd tab)
- sfrmSpouseAddresses
- TabSpouseCivic
- TabSpouseMailing

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.Form!TabControlName.Pages(TabClients .Value).SetFocus

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

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

===========

Forms!frmMain.Form!TabSpouseAddresses.Pages(TabCli entAddresses.Value).SetFocus

Method or data method not found

===========

Forms!frmMain.Form!TabSpouseAddresses.Pages(TabCli entCivic.Value).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)
- TabClientAddresses (2nd Tab - Client Addresses, has subform w/Civic
Tab and Mailing Tab)
- sfrmClientAddresses (Subform)
- TabClientAddresses (Tab Form on Subform - Caption =
Addresses)
- TabClientCivic (1st Tab - Caption = Civic)
- TabClientMailing (2nd Tab - Caption = Mailing)

Same naming concept for the Spouses tabs:

TabMainSpouse (Spouses Tab Form)
- TabSpouse (1st Tab - Spouses Info)
- TabSpouseAddresses (2nd tab)
- sfrmSpouseAddresses (Subform)
- TabSpouseCivic (1st Tab)
- TabSpouseMailing 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.Form!TabControlName.Pages(TabControl NameHERE.Value).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.Form!TabMainSpouse.Pages(tabClient.V alue).SetFocus

and if I try it this way:

Forms!frmMain.Form!tabClient.Pages(TabMainSpouse.V alue).SetFocus

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
Steve,

You're the best; worked like a charm:

Forms!frmMain.Form!TabMainSpouse.Pages(TabMainClie nt.Value).SetFocus

Once I built a new tab and had a look-see, it all came together!

Your diligence, and most importantly, patience's, is greatly
appreciated.

All the best!!

Dave

Jan 5 '06 #11
Dave, I'm glad it worked out for you. Remember that the .Value property
of a tab control always refers to the (0-based) index of the tab that
is currently being displayed.

Jan 6 '06 #12

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

Similar topics

4
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...
4
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...
12
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...
1
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...
17
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 -...
7
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...
1
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...
1
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...
2
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.