If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
CreateMenu()
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 |
#2
|
|||
|
|||
CreateMenu()
On Thu, 4 Jun 2009 20:12:34 -0700 (PDT), "
wrote: 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 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 |
Thread Tools | |
Display Modes | |
|
|