Tabbed form tab handling question

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
Back
Top