DoCmd.RunMacro action fails in Access 2007

G

Guest

I have a database created in Access 2002. When first opened in Access 2007,
the autoexec macro would not run due to the SetWarnings macro. This has been
solved by setting a Trusted Location. However, the following piece of code
fails:

DoCmd.RunMacro "MyMacro"

where "MyMacro" calls a set of functions. The error message is:

Runtime error 2501
The RunMacro action was canceled.

If I rewrite this code to call each function directly, and bypass the
RunMacro command, no error is received.

Anyone know why the RunMacro action should fail?

Thanks for the help.
 

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