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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop through the recordset underlying a report?

Status
Not open for further replies.

dkaplan

Programmer
Jan 29, 2001
98
US
Is it possible to use ADO to loop though the recordset underlying an open report. I am trying to put code in the Report’s on close event which will make a change to the records which the Report displayed.

Thanks.

Dennis


 
The data set under the report was created by filters (linked to the contents of the calling form) and thus re-creating it (the dataset)with SQL seemed clumsy and open to error. Since my objective is to operate only upon those records under the report, I thought it best to simply stick with the existing dataset. Is there some ADO (or even DAO) way of setting recordset = current recordset?

Thanks in advance.

Dennis
 
Lok at the recordsetclone method / property.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks, Michael. I actually tried this, but, as far as I can tell, set rs = me.recordsetclone will not work in a report. When I tried the same code in a Form it worked fine.

My code was:

Dim rs as object (also tried as ADODB.recordset)
set rs = me.recordsetclone

Any suggestions?

Thanks.

Dennis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top