PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Creating a menu on Access 2007 form

 
 
Azonei
Guest
Posts: n/a
 
      5th Jun 2009
I have some code that I have used for several years that will add a
menu bar to an Access form. The code no longer works in Access 2007.
In a nutshell, the Form_Open event is used to call the CreateMenu(),
CreatePopupMenu(), AppendMenu(), SetMenu(), and DrawMenuBar() API
functions. I have stepped through the code and found everything to be
working, but the menu just won't display. It works fine in Access
2003 and earlier.

Please note that this is a menu directly on the form, not a CommandBar
or Ribbon. The application I am creating does not show the Access
window at all and therefore the menu has to be directly on the form.
I know it can be done (or it used to be doable) because I've done it
for about 5 years...it just doesn't seem to work in 2007. (And yes I
know all of the potential problems associated with subclassing in
Access and how/why it is potentially unstable, etc.)

I found that the Form has to be a Popup window in order for the menu
to be displayed in earlier versions of Access, but this doesn't seem
to have any effect in 2007. If this property is not set, the form
window is a child of the MDI window and simply won't display its own
menu. Is there something in Access 2007 that keeps the form an MDI
child even with this property set? More importantly, can I get around
it?

I've been toying with the idea of just adding buttons to the window
and displaying a popup menu on the click event, but this really isn't
practical. By using a menu system, I don't have to redesign the
interface when a menu item is added or removed, I don't have to know
how many menu items will be used, and the people using the app can
manage the menus themselves, etc.

If anyone can shed some light on what has changed in Access 2007 to
prevent the menu from being shown, I would appreciate the insight.

Azonei
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Add a Right Click Menu to A Form in Access 2007 in the RunTime Environmane Stewart Berman Microsoft Access Forms 6 28th Oct 2009 08:45 PM
Create a menu bar on a form in Access 2007? Razor Microsoft Access Forms 1 29th Jan 2009 10:29 AM
Putting a menu control on a form in Access 2007 Saluce65 Microsoft Access Forms 2 9th Jan 2009 05:18 PM
how do i create a drop down menu in access 2007 form Peggy @ TDR Electronic Recycling Microsoft Access Getting Started 2 12th Sep 2008 09:02 PM
creating pull down menu in a form in Access =?Utf-8?B?a2F0aDAxNzg=?= Microsoft Access Forms 5 15th Nov 2006 04:59 AM


Features
 

Advertising
 

Newsgroups
 


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