Access 2000 How To’s: Creating Menus Using Access 2000


My experience with menus has been with Visual C++ and Visual Basic. Both Visual Basic and Visual C++ have wizards to help the developer easily create menu items and subitems attaching code for onclick events. Access 2000, on the other, unfortunately does not. But the good news is that Access 2000 menus are easy to create once you understand the necessary manual steps. This article will walk you step by step through creating a menu.

Create Your Application Menu

  1. Click “View”, “Toolbars”, “Customize”.
    Customize has three tab buttons: toolbars, commands, and options.
  2. From the toolbars tab, click on the “new” button.
  3. A popup dialog box will appear requesting a toolbar name; enter “myApplicationMenu”.
  4. A menu dialog will appear.

Create your Macros for Application Forms and Reports

  1. Create Macros for forms and reports next as the menu items or submenu items will run these macros.
  2. Use either OpenForm or OpenReport and initialize the command with the form name.

Adding Menu Items

    1. Click the “Commands” tab from the Customize Dialog.
    1. The Commands tab has two listboxes: Categories and Commands. The order of operation requires you to select a category and drag and drop a command into the menu dialog.
    1. Let’s do this. Click Category: File and Command: Custom. Hold the right mouse button down and drag and drop the command into the menu dialog. You’ll notice a menu item name “custom” appears.
    1. Change the Menu name by right clicking on the menu item. A popup dialog will appear; change the name to a form or report name. Another way to make the name change is to select the properties item.
  1. The properties dialog has the following textboxes:
        Caption: The display information of the menu item.
        ScreenTip: On hover tooltip.
        OnAction: Select the macro of the form or report you want to launch on a Onclick event.
        Style: Text Only or Image and Text.
        HelpFile: The filename of the helpfile.
        HelpContextId: Context Sensitive help.
        Parameter: Value passed by the menu item.
        Tag: Information that can be used later in the procedure event.

Adding Submenus

This requires dragging and dropping two category types: new menu and file categories. The new menu creates a parent menu item and the file category creates submenu types. This is a little tricky, so hopefully my steps will be clear enough for you to accomplish this task.

    1. Select new menu from the categories and then new menu from the command.
    1. Drag and Drop the menu item onto the menu dialog.
    1. Select file from the categories and then select custom from the command.
    1. Drag and Drop the submenu item onto the “New menu” item. The trick is not to drop the submenu item onto the menu item, but to instead put it in the drop down box below the menu item. This seems simple, but it initially took me about five minutes to figure that out.
    1. Using the properties popup, change the menu and submenu names and OnAction events.
    1. Close the Customize Dialog.
  1. Drag and Drop the menu dialog onto the toolbar.

Activitating or Deactivitating Custom Menus

  1. The custom dialog is used to activate or deactivate toolbar menus.
  2. The custom menu must be open in order to change menu items through the properties dialog.

That’s it! Hope you found this walkthrough helpful and instructive.

Back to Access 2000 How To’s Series Home

Latest Articles