By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,566 Members | 1,914 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,566 IT Pros & Developers. It's quick & easy.

Hiding Toolbars with code

P: n/a
Hi all,
Access 2002 XP platform.
I am trying to learn a little about programming (I know next to nothing
so far) and have found some code which hides the toolbars. However, this bit
of code is a little too effective and hides all of them including hiding the
database window. What I am after is the same effect
as disabling all the check boxes in startup which still leaves 'File',
'Edit', 'Insert','Records','Window' &'Help'. I want to do this via code so
that with a click of a button, I can show them again from a protected form.
This cannot be done though when the boxes are unchecked from startup.

Here is the code I have.

Private Sub Form_Open(Cancel As Integer)
Dim l As Integer
For l = 1 To CommandBars.Count
CommandBars(l).Enabled = False
Next l
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "Web", acToolbarNo
End Sub

Any help with this would be much appreciated :o)

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.