DoCmd.RunMacro action fails in Access 2007

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Back
Top