Tabbed form tab handling question

G

Guest

I have a form with a tabbed control. The control also has first, prev, next,
last navigation buttons shared by all tabs.
The way I want it to work is that whatever tab is the current tab remains
the current tab after navigating.
However, there is a situation on the first tab which requires me to set the
focus there when navigating (I have to enable/disable controls based on the
contents of a column).
My question is how to somehow save the tab I'm on and reactivate that tab
after navigating to a new record?
 
R

RuralGuy

Dim ReturnPage As Integer
ReturnPage = Me.TabCtl0.Value '-- Save the current TabPage
'
'-- Execute other stuff
'
'-- Return the focus back to the TabPage we entered on.
Me.TabCtl0.Pages(ReturnPage).SetFocus


I have a form with a tabbed control. The control also has first, prev, next,
last navigation buttons shared by all tabs.
The way I want it to work is that whatever tab is the current tab remains
the current tab after navigating.
However, there is a situation on the first tab which requires me to set the
focus there when navigating (I have to enable/disable controls based on the
contents of a column).
My question is how to somehow save the tab I'm on and reactivate that tab
after navigating to a new record?

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

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