473,386 Members | 1,835 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,386 software developers and data experts.

Detecting subform focus

I have a form with 4 subforms on a tab control. How can I detect which
sub/tab has the focus from the main form?

Many thanks.

Keith.
Jan 26 '07 #1
3 4924
Examine the ActiveControl of the main form to determine what control has
focus, e.g.:
Debug.Print Me.ActiveControl.Name

Examine the Value of the tab control to determine which page is currently
selected, e.g.:
If Me.Tab1.Value = Me.Page2.PageIndex Then ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Keith Wilby" <he**@there.comwrote in message
news:45**********@glkas0286.greenlnk.net...
>I have a form with 4 subforms on a tab control. How can I detect which
sub/tab has the focus from the main form?

Many thanks.

Keith.
Jan 26 '07 #2
Hi Keith,

If Me.TabControl = 0 then the first page(tab) of your tabcontrol is the active one
If Me.TabControl = 2 then the third page(tab) of your tabcontrol is the active one
So check the value of your Tabcontrol.

Arno R
"Keith Wilby" <he**@there.comschreef in bericht news:45**********@glkas0286.greenlnk.net...
>I have a form with 4 subforms on a tab control. How can I detect which
sub/tab has the focus from the main form?

Many thanks.

Keith.

Jan 26 '07 #3
"Arno R" <ar***********@tiscali.nlwrote in message
news:45**********************@text.nova.planet.nl. ..

Thanks guys.

Keith.
Jan 29 '07 #4

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

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
2
by: Mark B | last post by:
I have a form with a subform (normal) that itself has a subform (datasheet). I can't get a delete command button to work with the following code. It says "delete not available now". Any...
3
by: Steve Miles | last post by:
I've got a tabbed form with the 2nd tab containing a subform. I'm trying to avoid the need to use the mouse to set focus to the first field on the subform. I can use <CTRL><TAB> to open the 2nd...
2
by: js | last post by:
need help going from one txtbox in one subform to another textbox in another subform so i have main frm -inside there are: subfrm1 (textboxes: a1 a2 a3 ) and subfrm2 (b1 b2 b3) how do i go...
1
by: MP | last post by:
I have a main form that has a subform which also has a subform: the main form is the first subform is the second subform is When I click on the button »AddNewSubSubRecord« (add a new record...
1
by: Dean Slindee | last post by:
In my application there is a main form with a tabcontrol. On each page in the tabcontrol is a panel upon which is painted a "sub" form. The main form acts as the "application host", while the...
1
by: google | last post by:
I have a form with several subforms. Users enter the data, then on the parent there is a command button that runs code to generate a .pdf document from a report based on the data they are working...
8
by: OldBirdman | last post by:
This should be so, so simple I hesitate to ask. I have a Form named "fNavButtons" used as a SubForm in control named "subformNavButtons". subformNavButtons is a control on my main form named...
2
by: Element | last post by:
I have a master form with a simple subform that displays line items in datasheet mode. Everything works fine, except that when the subform has the focus, the standard Access sorting and filtering...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...

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.