Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset as datasource for report

Status
Not open for further replies.

MasterRacker

New member
Oct 13, 1999
3,343
US
Is there any way to use a vba populated recordset as a datasource for a report?

I'm thinking of just dumping it to atemp table and linking the report to that, but I was wondering if the recordset could be used directly.

Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
I think it is possible with a bunch of code but wouldn't try it. It should be much easier to dump to a temp table and use that as the Record Source of your report.

Duane
Hook'D on Access
MS Access MVP
 
That confirms what I was thinking. Thanks.

Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
use a docmd.openreport and set the recordsource using a SQL statement linked to a basic query. Give me some specs and I may be able to write some code for you.
 
I wanted to do this a couple years ago and eventually found some articles that confirmed it couldn't be done. My work around was to store the data in a temporary table and bind to that.
 
Not sure if I'd say it's impossible. I've opened a report setting a specific record as the recordset. Don't see why you couldn't do it with a query.
 
Well, at least since ac2003, you may play with the Report.Recordset property.
So, where is the problem ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I ended up using a temp table. I was originally worried about speed, but as it is, the whole process is so fast I don't have to worry about it at all.

Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top