B
BlockNinja
I have a parameter query crosstab that is set up like so in my code:
dim db as dao.database
dim rs as dao.recordset
dim qd as dao.querydef
....
set qd = db.QueryDefs("PQRY_CROSSTAB_FLASH")
qd.Parameters("[Enter Low Value]") = lowvalue
qd.Parameters("[Enter High Value]") = highvalue
set rs = qd.OpenRecordset
....
I want to copy the output of that query that is stored in rs into a new
table that I define (i.e. ideally I would want to say "select * into " &
OutputTable & " from rs", or something to that effect, of course you can't
simply reference a recordset by itself).
Anyone know how to do something like this? It would be preferrable to do
this without having to figure out what each field of the output is via a
nasty convoluted loop, etc etc. I tried also making a simple wrapper query
to do the append, but in the query designer, trying to put in the crosstab
table asks you for the parameters when you double-click it in the Show Table
dialog (and since my column names are dynamic... things get nasty).
dim db as dao.database
dim rs as dao.recordset
dim qd as dao.querydef
....
set qd = db.QueryDefs("PQRY_CROSSTAB_FLASH")
qd.Parameters("[Enter Low Value]") = lowvalue
qd.Parameters("[Enter High Value]") = highvalue
set rs = qd.OpenRecordset
....
I want to copy the output of that query that is stored in rs into a new
table that I define (i.e. ideally I would want to say "select * into " &
OutputTable & " from rs", or something to that effect, of course you can't
simply reference a recordset by itself).
Anyone know how to do something like this? It would be preferrable to do
this without having to figure out what each field of the output is via a
nasty convoluted loop, etc etc. I tried also making a simple wrapper query
to do the append, but in the query designer, trying to put in the crosstab
table asks you for the parameters when you double-click it in the Show Table
dialog (and since my column names are dynamic... things get nasty).