Access 2007 Automation -- Unable to Show Popup Menu

S

Stewart Berman

I open an Access 2007 database and run code that creates another instance of Access (mappAccess) and
uses it to open another database as currentDB (mappAccess.OpenCurrentDatabase). It is visible on
the desktop. One of the things I need to be able to do as part of the process is to show a custom
shortcut menu, "Custom Menu" from the opened database. This code:
mappAccess.CommandBars("Custom Menu").ShowPopup
Throws:
Automation error
Unspecified error
The error number is -2147467259 or 80004005 in hex.

If I just open the second database in Access and run the above code the popup menu is displayed so
it appears the definition of the popup menu is correct.

Is there anyway to show a popup menu in a database opened in another instance of Access?
 

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