Do Menu Item

A

Anthony Viscomi

I am trying to create some VBA that will perform a DoMenuItem. What I am
trying to achieve is sending 5 various reports to a XLS using the "Analyze
It With MS Excel" feature from the Reports Toolbar. My development is in XP,
but I will be converting the DB to 97 when I deploy it. My problem is that I
can't seem to get the parameters correct. There may be an easier way to
perform this task; if so please let me know. I prefer to send the Reports to
Excel rather than the queries because the Reports retain the formatting when
exported. I would also like all of the reports (5) to reside within 1
spreadsheet, each having their own workbook.

Thanks in advance!
Anthony Viscomi
 
A

Arvin Meyer

DoMenuItem is archaic code from Access 95 and earlier. If you have a
reference to the Extensibility Library it will work in all versions, but you
must tell it what version you are looking for. Since you can't look at the
Menu structure of earlier versions, getting it right is difficult and
frustrating.

It has been replaced with RunCommand:

DoCmd.RunCommand

Since Access help is less than ideal (to put it mildly) I suggest you open a
code window, turn on the Object Browser, and search on the following:

RunCommand

and

acCommand

Much better help can be found for the RunCommand constants including code
snippets at Terry Wickenden's website:

http://home.clara.net/tkwickenden/

HTH
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
A

Anthony Viscomi

Thanks
Arvin Meyer said:
DoMenuItem is archaic code from Access 95 and earlier. If you have a
reference to the Extensibility Library it will work in all versions, but you
must tell it what version you are looking for. Since you can't look at the
Menu structure of earlier versions, getting it right is difficult and
frustrating.

It has been replaced with RunCommand:

DoCmd.RunCommand

Since Access help is less than ideal (to put it mildly) I suggest you open a
code window, turn on the Object Browser, and search on the following:

RunCommand

and

acCommand

Much better help can be found for the RunCommand constants including code
snippets at Terry Wickenden's website:

http://home.clara.net/tkwickenden/

HTH
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

that Reports
 

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