Using Execute

PaulSpell

Registered User.
Local time
Today, 00:50
Joined
Apr 19, 2002
Messages
201
Is there any benefit to using the Execute method over Docmd.Openquery or Docmd.RunSQL, is this just a matter of personal preference?
 
I've never used the RunSQL command, but I know you can only use Execute to run action queries. You also don't get warning messages when you use Execute command. For example, if you're running a delete query, the Execute method won't warn you that you're about to delete records.

The OpenQuery command can be used to open select queries or to run action queries, but it will give you warning messages (unless you choose to turn them off).
 
I just started using Execute. I seem to be running into problems with strings and dates when the values are empty. I don't recall having the problem with docmd.runsql. Does anyone know where info on this might be documented?
 
Paul,

The Docmd.Openquery can open a query and potentially let you view the results.

The Docmd.RunSQL performs an action query, but makes no provisions for viewing
or capturing data.

I use DoCmd.RunSQL for action queries, but I don't think that there would be
any difference with DoCmd.OpenQuery.

For a non-action query, you can only use DoCmd.OpenQuery.

Wayne
 

Users who are viewing this thread

Back
Top Bottom