Macro with Output To Command Prompting issue

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?
 
M

Mike

add a runcode line to the very begining of your macro and add this statement
to the funtion name:

DoCmd.SetWarnings False
 
S

Steve Schapel

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.
 

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