I already posted this in the reporting forum, but I think my question is more specific to the actual command I want to use with my recordset, so I'm posting again here. Can anybody help me with the following issue?

I have a database with a table called "Results" that I often need to print data from. When the data is first inserted, a report in generated, but I need to be able to regenerate old reports based on the date they were originally printed (which is stored in a field in my Results table). For ease, or so I thought, I made a temporary table to store the data that needs printed, since not all of the data in the Results table will need to be inserted into my report. I connected that table, called TempStore, to a data access object in Visual Basic, and then setup grouping on multiple fields, which reflects in my data report.

The report works exactly as I want, grouping by about 5 fields, and then showing details line for each grouping; however, if I try to run the report during the same run of the program, but with a new set of data, it still shows the old data. Regardless of the fact the report has been closed, it seems to store all the data from the original running of the report. It's my understanding that setting the datasource of the data report to an ADO RecordSet object would solve the problem. I've been able to get this to work with simple queries, but not with grouping. Below is a sample I found for refreshing a simple data report. Does anybody know how to modify the SQL query to work with groupings?

Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & App.Path & "\books.mdb;" & _
"Persist Security Info=False"
Set rs = conn.Execute("SELECT Title, Year, URL, Pages, " & _
"ISBN FROM BookInfo ORDER BY Title")
Set rptTitles.DataSource = rs
rptTitles.Show vbModal