Macro to automatically change tab showint when form loads

  • Thread starter Thread starter Tom Woodard
  • Start date Start date
T

Tom Woodard

Hi Everyone!

I have a tab control with 4 pages. I am looking for a way (either macro or
VB) that will look at a field on the main form and automatically switch to
the page with the same name as the value in the field. Try as i might i cant
figure this out.

Thanks
 
Tom,

You can do this with a macro, on the Load event of the form. Or maybe the
Current event is more applicable.

In the macro, use a GoToControl action. Set the Control Name argument like
this:
=[NameOfField]
.... substituting the actual name of the control on the form whose data
contains the name of the tab control page.
 
Back
Top