Macro to automatically change tab showint when form loads

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
 
S

Steve Schapel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top