Problem wiht gotfocus events etc.

  • Thread starter Thread starter Missy
  • Start date Start date
M

Missy

Hello,

I have a form that worked fine with activate and gotfocus
events and now I put that form as a subform in a tab
control and now the activate event no longer works. I
have about 4 tabs each with events in activate (when that
form is displayed), but none of those events work
anymore, how would I fix this, thanks.

Missy
 
you have to specify it into the change event of your tab control

Private Sub MyTab_Change()
MsgBox "This tab is number : " & myTab.Value
End Sub

when you the user selects another tab, it will come into this even
and for you, to be able to deffrenciate wihch tab you have to use, you can
do:

Private Sub MyTab_Change()
If myTab.Value = 0 then 'first tab
.....
elseif myTab.Value = 1 then
....
endif
End Sub
 
Back
Top