Advertisement

11.14.2007 at 03:29PM PST, ID: 22961672
[x]
Attachment Details

MS Access VBA - Run Executable Query Based Upon VBA Recordset

Asked by advlegals in Access Coding/Macros, Microsoft Access Database

Tags: vba, access, query, recordset, ms

I have the following:

strSQL = "Select a ton of stuff"
Set rstTonOfStuff = db.OpenRecordset(strSQL)

db.Execute "Insert Into table (field, field...) Select " &  rstTonOfStuff!Field & " , " &  rstTonOfStuff!Field & " , " &  rstTonOfStuff!Field & " & _
" From " & rstTonOfStuff & ""

I'm trying to use a VBA recordset as a basis for a secondary VBA query. Please disregard any syntax errors with the above; it's a representation of what I'd like to get working.

Is it possible to use a VBA recordset as the bases for a secondary VBA query?

Thank you.Start Free Trial
[+][-]11.14.2007 at 04:03PM PST, ID: 20285198

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Access Database
Tags: vba, access, query, recordset, ms
Sign Up Now!
Solution Provided By: tygrus2
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.14.2007 at 04:08PM PST, ID: 20285240

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628