pull down menu in Access application

G

Gerd Sechting

Currently I am busy to develop applications with Visual
Basic 6 and VBA for MS Access.
Recently I used the pull down menu creator in VB 6 whitch
is very handy to deal with.
Till now I couldn't find an equal methode to apply a menu
creator in Access with VBA.
I only know the command button on the toolbar of MS Access.
Can someone recommend a methode to solve this problem?

Thanks.
Gerd
 
G

Graham R Seach

Gerd,

Access doesn't have anything like the menu creator in VB6. In Access, menus
are toolbars that have their Type property set to "Menu bar".

1. From the [Database Window], right-click the menu area, and select
[Customize] from the context menu. The [Customize] dialog is displayed.

2. Select the [Toolbars] tab, and click [New]. The [New Toolbar] dialog is
displayed.

3. Give it a name, and click [OK]. A new toolbar is displayed.

4. From the [Customize] dialog, select the [Commands] tab.

5. Scroll down to the bottom fo the [Categories] list, and select [New
Menu].

6. In the [Commands] list, drag the [New Menu] command onto the new toolbar.

7. Right-click the new menu item, and change its [Name] property to whatever
you like.

....the rest is for example only.

8. Scroll back up to the top of the [Categories] list, and select [File].

9. Drag the [New] command and hold it over to the menu item you added in
Step 6. You'll notice a small box appear. Drop the [New] command onto that
little box. This creates the first sub-item.

10. Drag the [Custom] command and drop it on the new box as you did in Step
9.

11. Right-click the new menu sub-item, and select [Properties] from the
context menu.

12. Change the various properties as you like, and select/enter the name of
an existing macro or function (not a sub) in the [On Action] combo, then
click [Close].

You've just created a new toolbar with 2 sub-items. Now all you have to do
is convert it to a menu.

13 From the [Customize] dialog, select the [Toolbars] tab.

14. Scroll down to the bottom of the [Toolbars] list, and select your new
toolbar.

15. Click [Properties]. The [Toolbar Properties] dialog is displayed.

16. Change its [Type] property to "Menu Bar".

17. Click [Close].

That's it! Easy huh!! <grin>

Graham R Seach
Microsoft Access MCP, MVP
Sydney, Australia
 

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

Top