Nothing work when Tab Control used

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

Guest

The codes below maximize form and hide/show toolbars. They work great in all
forms, except the one with a Tab Control (which has some pages and subforms
within each page) in detail section. An error message returns "User-defined
type not defined". I've checked references, no reference is missing. So
what's wrong?? Thanks

Private Sub Form_Load()
' Maximize the form
DoCmd.Maximize
End Sub

Private Sub cbShowToolbars_Click()
DoCmd.ShowToolbar "Menu Bar", acToolbarYes
CommandBars("Form View").Visible = True
End Sub

Private Sub cbHideToolbars_Click()
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
CommandBars("Form View").Visible = False
End Sub
 
Finally, I found out where the problem is!
The maxi/hide/show codes themselves have no problem. It's the code that I
used to change tab colour (which didn't work anyway) that prohibits other
codes from funtioning properly.
Thanks to everyone attempted answering my question :)

Regards,
Sam
 
Back
Top