Macro with Output To Command Prompting issue

  • Thread starter Thread starter Chad Landry
  • Start date Start date
C

Chad Landry

I am trying to set a macro with an Output To Command to run automatically
using the on timer event in a form. However, I am prompted with a message
that asks if I want to replace the file. If I run the same macro using a
button (not automatically) I don't get the message. Is there a way to remove
the prompt when I run it automatically?
 
add a runcode line to the very begining of your macro and add this statement
to the funtion name:

DoCmd.SetWarnings False
 
I'm pretty sure this won't solve it. If you are going to use SetWarnings,
why not just a SetWarnings action directly in the macro, rather than calling
it from a VBA procedure? But in any case, this is not the type of prompt
message that SetWarnings effects.

Having said that, I am sorry I do not know the answer to the question. I
can't understand why a macro would behave differently depending on the event
it is run from.
 
Back
Top