Full Version: is there a "got focus' for tabs
UtterAccess Forums > Microsoft® Access > Access Forms
phantomodopera
I know tabs have a on change event, but is there something that would trigger a 'got focus' or something similar for tabs?
Jack Cowley
There is probably a control on your tab that receives the focus first and you could have your code in that control....
th,
Jack
vtd
Guessing of what you want: Use the TabControl_Change Event to check the TabControl value which gives the index of the active TabPage, i.e. the TabPage that has / recently gets the Focus ...
oes that sound like what you want?
phantomodopera
I was hoping to find something that would trigger before the tabbed form actually showed, for example in 1 instance I have a tab with only a subform, however depending on other circumstances the actual subform changes. This creates an annoying flickering as the forms change which is 1 of the things I am trying to prevent
Jack Cowley
Search Access help for Echo (Application.Echo) as that may help you with the flicker when you change the subform...
th,
Jack
phantomodopera
thanks Jack, but been there done that - It did help alot but I still have some flicker
Jack Cowley
At this point I do not know what else to suggest to you. If you change the Source Object once the form is open I guess you are stuck with some flicker as you change objects as I am sure you are using the Echo command as early in your code as you can...
ack
SerranoG
The way you know which tab has the focus is to look at the numerical value of the tab control itself. Suppose your tab control is called ctlMyTabControl and you have four tabs on it. You know the second tab has the focus when Me.ctlMyTabControl = 1 (the tab numbering starts at zero). Usually you check for that at the tab control's ON CHANGE event.
vtd
See if Allen Browne's "Flicker with tab controls" article helps ...
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.