Generally the code sets the focus to the subform first. The next line of code would set the focus to the combo box. Having the subform on a tab control makes no difference (at least in previous versions).
I don't think there's a direct way to activate a specific tab. Can you assign an accelerator to the tab page you want and then do a SendKeys "%x" in the button click event (where x is the accelerator key you assigned to the tab)?
Sheesh, I sure botched that one. I thought for sure I tested setting the Value property. Nothing like advising someone on the most convoluted solution possible :~/
Here is what I have been trying so far.....I hope one of you guys will catch what I am doing wrong. In the last text box before needing to hop to the tab control page that holds my subform I tried putting
Lost Focus()
TabCtl49.Pages(0).SetFocus 'Tabl Control page
frmDependents.SetFocus 'Set Focus on subform
into the "On Lost Focus" event
I am really new to this VB stuff...........when I test
if the Tab control page (0) is on top everything flows fine.
If the user leaves Tab control page (1) on top the tab order goes completely out of wack!
Thank you dhookom. I tried your suggestion of putting
frmApplications!TabCtl49.Pages(0).SetFocus
into the "Save Record" command button. I put it in
at the beginning because an "On error" dialog telling
the user that the record is saved...was already in there
along with the focus to move the cursor to a search text box.
It worked! Now every time the user clicks "Save" the
Tab (0) gets the focus, a dialog says record is saved, and the focus moves to the look up text box. Thanks everyone..I love this forum!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.