RunSQL basically runs the query "through Access" whereas Execute is talking more
directly to Jet. The result is that RunSQL will bring up the warning prompts
unless you add lines of code to suppress them and then turn them back on
afterwards. Execute does not do this.
Execute is easier to set up error handling for if you include the dbFailOnError
argument and might be marginally faster.
RunSQL (since it goes through Access) can use form references like
Forms!FormName!ControlName embedded directly in the SQL or query. Execute would
need an explicit parameter declared or else you would need to delimit the SQL
string so that Execute is passed the value of the reference instead of the
reference itself.
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.