Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Menu bar 1

Status
Not open for further replies.

jpl458

Technical User
Sep 30, 2009
337
US
I have a small look-up application that others need access to. I just want to make it accessible as a plain vanilla MDB, but I would like to restrict what those folks can do in ACCESS. I can remove all the tool-bars, but is there a way of removing the menu bar that has 'File', 'Tools', etc, and have a way to get that menu bar back. Eventually, this will be a run time module. Just want it out the for a bit to see if it needs any tweaks.

Thanks

jpl
 
How are ya jpl458 . . .

Following is a routine specific in controlling the visibility of the main [blue]Menu Bar[/blue]. An arguement of the routine [blue]True[/blue]/visible or [blue]False[/blue]/hidden does the trick.
Code:
[blue]Public Sub MenuBarCtl(ctl As Boolean)
   'Ctl = True = MenuBar On
   'Ctl = False = MenuBar Off
   CommandBars("Menu Bar").Enabled = ctl
End Sub[/blue]
The problem with the above is that its not permanent. Hide the bar, then close and reopen the Db ... you'll find the Bar restored! To circumvent this you need an [blue]AutoExec[/blue] macro or an [blue]AutoKeys[/blue] macro or an event in the 1st opened form to hide the bar ... The choice is yours ...

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Putting it in the first opened formk sounds good except the ap opens to a specific form. But it seems if the routine is executed On Open, then its stuck there. How would I turn it off. Could have an invisible spot on the form that turns the bar back on I guess.

Thanks for the help.

jpl
 
Putting it in the first opened form sounds good except the ap opens to a specific form. But it seems if the routine is executed On Open, then its stuck there. How would I turn it off. Could have an invisible spot on the form that turns the bar back on I guess.

Thanks for the help.

jpl
 
jpl458 . . .

Call the routine again in the 1st open forms [blue]On Close[/blue] event. Just make sure you run the code before you exit the Db. The controlling points [blue]On/Off[/blue] are yours ... [thumbsup2]


See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top