Runing query with VBA getting no records while manually run ok

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
 
D

Douglas J. Steele

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

Use the Execute method of the Command object.
 
M

muster

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

Top