Page Order in Tab Control

T

tgavin

I have 2 pages in a tab control on a form, each of which contains a different
subform. If the client code on the main form is one of 4 choices (one of
which is null), I would like Page 2 to be the top page when you go to the
client, if it is one of the remaining 2 choices, I would like Page 1 to be on
top. I do need both pages visible and enabled at all times.

Is there a way I can do this?

Thanks
Terri
 
T

Tom van Stiphout

On Wed, 17 Mar 2010 12:43:02 -0700, tgavin

I am confused. With "top page" do you mean the selected page, or do
you want to change the order of the pages.
The selected page can be set by setting the value of the tabcontrol:
if IsOneOfFourChoices() then
Me.myTabControl.Value = 0 'select page with index 0
else
Me.myTabControl.Value = 1
end if
Note that IsOneOfFourChoices() is a private function in this form
returning a boolean, which determines if those conditions are true or
false.

-Tom.
Microsoft Access MVP
 

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