CreateMenu()

R

rdewards

I have code to create menus using API function calls on an Access Form
(not on the Access Menubar) that works great in Access 2003 and
earlier. When I use this code in Access 2007, I get squat. It's too
much code to post here, so in summary, here's what I'm doing:

I have a table that hold all of the information for my menus (MenuID,
Caption, Position, ParentID, and Action). In the Form_Load event I
call CreateMenu(), then loop through the items in my table and make a
call to CreatePopupMenu() if the item is a popup menu, or AppendMenu()
if the item is a menu command item. Once the menu is built, I call
SetMenu() to attach it to the AccessForm. (Subclassing and use of the
MSScriptControl object to run the code for each button rounds off the
method).

The process has always worked for me since I started using it in
Access 2000 until now. Can anyone shed any light on what changed in
Access 2007 to make these API calls apparently meaningless?

Thanks in advance

Roy
 
T

Tom van Stiphout

On Thu, 4 Jun 2009 20:12:34 -0700 (PDT), "(e-mail address removed)"

I'm sure you noticed Office2007 uses the Ribbon. What would be really
cool is if you would rework your code to create Ribbon elements rather
than menus.
You might as well embrace it; ribbons are here to stay.

-Tom.
Microsoft Access MVP
 

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