Prev: Creating a date from week number, day number and year value
Next: OLE OBJECT IN MS ACCESS WITH BITMAP FILES
From: Stewart Berman on 12 Oct 2009 18:45 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?
From: Stewart Berman on 23 Oct 2009 00:05
Bump Stewart Berman <saberman(a)nospam.nospam> wrote: >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? |