P
pietlinden
I am working on a database where users routinely run a series of
queries and copy and paste the results into Word. (Think of it sort
of like a report, but they can edit it... and the editing part is
critical, so I can't do it in a report.)
In the 2002 Developer's Handbook Desktop edition, I have the MultiPik
listbox thing working fine. (Even with a collection of queries).
Herein lies the rub, though... DAO would be *perfect* if I could use
the GetString method (but since it's an ADO method, I can't rightly do
that!), because I'm just converting the recordset into a delimited
list and then stuffing it into Word and converting it to a table.
Because ADO is funky about what it considers a Views and Stored
Procedures, how would I make the code work regardless (as if I were
dealing with a "catch-all" kind of QueryDef object)? I can get the
record-returning queries in DAO by using...
If CurrentDB.QueryDefs(strQueryName).Type = dbQSelect Or
CurrentDB.QueryDefs(strQueryName).Type = dbQCrosstab Then...
'--- Do something with the query
End If
Is there a way in ADO to treat the two the same way? Or are there any
other options? Otherwise, I get stuck with ... looking in the wrong
collection (Views/Sprocs) or whatever...
and that's the part I want to be transparent.
Thanks!
Pieter
queries and copy and paste the results into Word. (Think of it sort
of like a report, but they can edit it... and the editing part is
critical, so I can't do it in a report.)
In the 2002 Developer's Handbook Desktop edition, I have the MultiPik
listbox thing working fine. (Even with a collection of queries).
Herein lies the rub, though... DAO would be *perfect* if I could use
the GetString method (but since it's an ADO method, I can't rightly do
that!), because I'm just converting the recordset into a delimited
list and then stuffing it into Word and converting it to a table.
Because ADO is funky about what it considers a Views and Stored
Procedures, how would I make the code work regardless (as if I were
dealing with a "catch-all" kind of QueryDef object)? I can get the
record-returning queries in DAO by using...
If CurrentDB.QueryDefs(strQueryName).Type = dbQSelect Or
CurrentDB.QueryDefs(strQueryName).Type = dbQCrosstab Then...
'--- Do something with the query
End If
Is there a way in ADO to treat the two the same way? Or are there any
other options? Otherwise, I get stuck with ... looking in the wrong
collection (Views/Sprocs) or whatever...
and that's the part I want to be transparent.
Thanks!
Pieter