Run Make-table query

Q

Question Boy

How can I run a make-table query from code and bypass any form of user
intervention including confirmation prompt(s). The query's name is
'qry_ExportData'.

Thank you,

QB
 
P

pietlinden

How can I run a make-table query from code and bypass any form of user
intervention including confirmation prompt(s).  The query's name is
'qry_ExportData'.

Thank you,

QB

either use
DbEngine(0)(0).Execute "qry_ExportData"

or turn warnings off, run your stuff, turn warnings on..
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_ExportData"
DoCmd.SetWarnings True

If you use SetWarnings, make sure you include error-trapping code to
turn the warnings back on, or they'll be off for the rest of the
application. Well, until you close/reopen or reset...
 

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