[AccessD] Storing SQL in VBA

John Bartow john at winhaven.net
Tue Aug 1 11:43:38 CDT 2006


Chester,
I think you may want to have two queries.

One which creates a recordset and one which performs an action on the
recordset.

Or in the case of an action query that creates data, one which performs the
action that creates the data and one which creates a recordset of the newly
created data.

HTH
John B.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, August 01, 2006 11:30 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Storing SQL in VBA

I was wanting to use the results of the select query.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
Sent: Tuesday, August 01, 2006 10:48 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Storing SQL in VBA

Hi Chester:

You can get back the record count of the records you affected...is that what
you want?

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, August 01, 2006 7:57 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Storing SQL in VBA

I want to store and execute an action query in VBA. Did some research and
found RunSQL will not work on action queries. The execute method will run
the action query SQL but returns no recordset. So is there a way to store
and execute an action query in VBA and then use the results?

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

 

No trees were killed in the sending of this message. However a large number
of electrons were terribly inconvenienced.

 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list