Suppressing warning messages from MakeTable query

J

John S. Ford, MD

I have a command button on a form than executes a MakeTable query using the
DoCmd.RunSQL method based on entered criteria. It works fine but creates a
table deletion warning and an "about to paste records" warning that I'd like
to supress because they're superfluous.

How can I do this? Can it be done without supressing other important
warning messages elsewhere?

John
 
L

Lord Kelvan

docmd.SetWarnings = False
'your code
docmd.SetWarnings = true

remember to set it back to true for other warnings after the fact

regards
Kelvan
 

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