View Full Version : Best way to run query?


Malcy
12-07-2007, 03:34 AM
I am upgrading and optimising an application. I am wondering if I am running queries the best way.
Currently I am using
DoCmd.SetWarnings False
strQryDef = "qupdSsnScrOp"
DoCmd.OpenQuery strQryDef, acViewNormal, acEdit
DoCmd.SetWarnings True

Might I be better using a db.execute method instead to speed things up?
Any thoughts most appreciated. Thanks

ajetrumpet
12-07-2007, 02:44 PM
I am upgrading and optimising an application. I am wondering if I am running queries the best way.
Currently I am using
DoCmd.SetWarnings False
strQryDef = "qupdSsnScrOp"
DoCmd.OpenQuery strQryDef, acViewNormal, acEdit
DoCmd.SetWarnings True

Might I be better using a db.execute method instead to speed things up?
Any thoughts most appreciated. ThanksDepends...you can't use the db.execute method to SELECT anything, so, if all you're doing is opening a query, and viewing it, db.execute is not part of your alternatives, because there is no action taking place.