Returning to correct Tab

  • Thread starter Thread starter John Ortt
  • Start date Start date
J

John Ortt

Hi everyone,

I have a search box above a tabbed form and when I run the search I refresh
the data on each tab.

This works fine but the problem is that it always defaults back to the first
tab.

Is there a way to find which tab is visible prior to the code running so
that I can return to it at the end?

Thanks in advance,

John
 
Examine the Value of the tab control.

It will match the PageIndex of whichever page was active.
 
Thanks for the advice Allen,

One more quick question if you don't mind,

How do I examine the value of the tab control?

Thanks again,

John
 
Me!NameOfTabControl should return the number of the page that's being
displayed (its Page Index value).
 
Thanks Doug,

I'll try it now.


Douglas J. Steele said:
Me!NameOfTabControl should return the number of the page that's being
displayed (its Page Index value).
 
Worked a treat,

I just used the following code:

Dim CurrentTab As Integer
CurrentTab = Me!TabMenu

'The rest of the code went here

me!TabMenu = CurrentTab

Thanks guys.
 

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

Back
Top