Rabu, 25 Maret 2015

RE: [MS_AccessPros] db.execute query not working

 

Sarah,
Can you provide some clarity regarding what you mean by "DOES NOT WORK"?
Also, what is the SQL view of the query?
I would use:
 
db.Execute "mltc1bp2", dbFailOnError
 
Duane Hookom, MVP
MS Access
 

Date: Wed, 25 Mar 2015 13:43:12 -0700
Subject: [MS_AccessPros] db.execute query not working
I recall that it is better to use db.excute for a query than docmd.openquery.
I am struggling with the following, the same query works when I run it with DOcmd, but does not work with db.execute:

DoCmd.OpenQuery "mltc1bp2", , acEdit  (THIS WOKRS)
CurrentDb.Execute "mltc1bp2" (THIS DOES NOT WORK)

 
also tried
set DB=currentdb()
DB.execute and it does not work either.

However I have other queries that work fine with db.execute,.

What might be the reason?.

Sarah
 

__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar