Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Runing query with VBA getting no records while manually run ok

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
muster - 29 Mar 2007 16:55 GMT
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
Douglas J. Steele - 29 Mar 2007 17:06 GMT
Make Table queries don't create recordsets. (No action query - INSERT INTO,
DELETE, UPDATE - does).

Use the Execute method of the Command object.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi ALL,
>
[quoted text clipped - 11 lines]
> Thank you,
> muster
muster - 29 Mar 2007 18:32 GMT
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,

On Mar 29, 12:06 pm, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> Make Table queries don't create recordsets. (No action query - INSERT INTO,
> DELETE, UPDATE - does).
[quoted text clipped - 22 lines]
>
> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.