Microsoft KB Archive/109337

= ADT/ODE: How to Hide the Database Window Menu Bar =

Article ID: 109337

Article Last Modified on 5/6/2003

-

APPLIES TO


 * Microsoft Access Distribution Kit 1.1
 * Microsoft Access Developer's Toolkit 2.0
 * Microsoft Access Developer's Toolkit 1.1
 * Microsoft Office 97 Developer Edition

-



This article was previously published under Q109337



Novice: Requires knowledge of the user interface on single-user computers.



SUMMARY
In Microsoft Access 97 and 7.0, you can disable the default menus by simply selecting an option in the Startup dialog box. In Microsoft Access version 2.0, you can use the MenuBar property to hide the menu bar. In Microsoft Access version 1.x, in order to hide the menu bar associated with the Database window, you must hide the Database window itself.



Microsoft Access 7.0 and Microsoft Access 97
In Microsoft Access 7.0 and Microsoft Access 97, the version 2.0 method will work, but there is also an easier way. On the Tools menu, click Startup. In the lower left of the dialog box, select a new default menu from the Menubar box. You can also click to clear the Allow Full Menus check box to limit the available menu items to basic choices.

Microsoft Access 2.0
In Microsoft Access 2.0, the MenuBar property applies to the application object, forms, and reports, and can be set in the AutoExec macro for the application as a whole. You can use the MenuBar property for custom menu bars at all points in your application, even while in the Database window and reports.

Microsoft Access 1.x
In version 1.x, the menu bar that appears when the Database window is selected is always the Database window menu bar. The run-time version of Microsoft Access hides the Database window by keeping it minimized and not displaying the minimized window's icon. However, the Database window's menus and commands are still available on the menu bar.

To keep the Database window's menu bar from being displayed, you must hide the Database window. The following sample macro action demonstrates how to hide the Database window. Add this action to the executable application's AutoExec macro.

NOTE: Make sure to add this action before any OpenForm actions in the AutoExec macro in order to avoid hiding the forms after they are opened.   Macro Name  Action AutoExec   DoMenuItem MenuBar: Database Menuname: Window Command: Hide

