Runing query with VBA getting no records while manually run ok

  • Thread starter Thread starter muster
  • Start date Start date
M

muster

Hi ALL,

I run a bunch of queries in code, this patiqular qry_ABC is a make
table query. I run it ok manually, but if I run it like below in code,
it got no records. Other queries run ok in code.

.... other queries
rs.Open "qry_ABC", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic, adCmdStoredProc
....

Any thoughts?

Thank you,
muster
 
Make Table queries don't create recordsets. (No action query - INSERT INTO,
DELETE, UPDATE - does).

Use the Execute method of the Command object.
 
Thanks. In fact all other queries are make table queries and they are
ok. This one also creates the table but gets no records.
Pherhaps anything special for this one is that it is based on a select
query.

Still need help.
Thanks,
 

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

Back
Top