Quick code correction needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The code below is an OnClick event of a command button on a subform to switch
from Tab1 to Tab2. But now I'd like to put the button on Tab1 itself instead
of in the subform contained within. How do I modify the code? Thanks

Private Sub cbGoToTab2_Click()
' Switch to Drawing Amendment tab (PageIndex =2)
Me.Parent.TabCtl.Value = 2
End Sub
 
Hi,
I would imagine you could just remove the Parent reference.
What have you tried so far?
 
Back
Top