You could Dcount the recordset in the OpOpen event (to obtain the total
number of detail records) and then keep a running counter somewhere.... When
they're equal ..... !!!!!
Thank you so much for the assistance.
That worked perfectly. I had thought about it before, but I was using a
parameterized query, and I thought that I would have trouble with my
parameters, but since they had already been supplied, I just had to do a
DCount(<query column>, <query name>). BTW, I placed this in my reports
ReportHeader_Format event, since this comes after the Open event, which is
where I supply my criteria to the Query.
Again thanks so much.
It was the last item I needed for this report.
You have made my weekend!
LThibx
Bob Howard said:
You could Dcount the recordset in the OpOpen event (to obtain the total
number of detail records) and then keep a running counter somewhere.... When
they're equal ..... !!!!!
Add a text box named txtTotalCount to the Report (or group)
header section using the expression =Count(*). This will
tell you how many records are in the report (or group).
Also, add a text box named txtLineCount to the detail
section using the expression =1 and RunningSum set to Over
All (or Over Group).
Now, you can use code in the detail section's Format event
to check if the vlues in the two text boxes are equal:
If Me.txtLineCount = Me.txtTotalCount Then
'do something special for last detail
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.