jstutz
06-07-2000, 05:49 AM
Does anyone know how to set the focus to a particular tab of a tab control using VBA? I have a form w/ 3 tabbed control on it and after the user runs a search, I would like the form to open displaying the 3rd tab instead of the first. Thanks in advance!
Jamie
Hi Jamie,
you need to use;
Me!TabCtl0.Pages(2).SetFocus
replacing TabCtl0 with whatever the name of your tab ctl is. You want to place the code in the On_Open of you form if it will happen every time the form is opened ( but why not just make it tab 1 then ? ) or, more likely I guess, code around it depending on the case
HTH
Drew
[This message has been edited by KDg (edited 06-07-2000).]
jstutz
06-08-2000, 06:00 AM
Great! Thanks very much! I knew it was simple, but could not remember how to do it!
Jamie