append without getting the OK message?

K

kellie jones

I'm doing an append query within VB. (docmd.RunSQL sqlstmt)
Each time the query is run it asks "you are about to append 3 records" and
you have to click OK.
It's not a problem for me - but I don't want the users to see this prompt.
Can I run it without getting the prompt?
 
D

David Ferguson

Create a macro and on the first line use the 'Set Warnings' command and set
it to Off
Then add your query on the second line (Open Query)
Finally switch the prompt back on again using another 'Set Warnings' command
and set it to On
 
Top