A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

CreateMenu()



 
 
Thread Tools Display Modes
  #1  
Old June 5th, 2009, 04:12 AM posted to microsoft.public.access.tablesdbdesign
[email protected]
external usenet poster
 
Posts: 1
Default 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  
Old June 7th, 2009, 06:30 AM posted to microsoft.public.access.tablesdbdesign
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.