Nothing work when Tab Control used

S

Sam Kuo

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
 
S

Sam Kuo

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
 

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

Similar Threads


Top