How can I desactivate the MENU BAR in access

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

Guest

Hi. I would like to desactivate the MENU BAR in access so users cannot click
were they are not supposed to click.

Marco
 
Paste this function somewhere and call it from your startup form
(switchboard)

Public Function DisableMenus()
Private CmdBar As CommandBarControl

For Each CmdBar In Application.CommandBars("Menu Bar").Controls
CmdBar.Visible = False
Next

End Function
 
Hi, it returns me an error. I past the code into a Module, after I when to
swithboas and On Load I write Call DisableManus

But returns me an error.
Marco
 
Hi Marco,

Details of the error would have been helpful.

However, when I tried this, I found that the declaration
Private CmdBar As CommandBarControl
gave me a compile error. Replacing this with
Dim CmdBar As Object
removed the error, and the routine works.

HTH,

Rob
 

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

Back
Top