After last detail line prints

D

Darryl

Using Access 2000.
Have created a report. Need to determine when the last detail line prints
so I can
print another line of Info. Can't use the page/report headers or footers
due to the
complex query used to generate data for the report.

Any ideas ?

thanks,
Darryl

(using headers/footers yields the dreaded Multi-level group by clause is not
allowed in a subquery).
 
D

Duane Hookom

I don't fully understand why you want to do this but you could try:
-add a text box to the Report Header
Name: txtCountAll
Control Source: =Count(*)
-add a text box to the detail section
Name: txtRunSum
Control Source: =1
Running Sum: Over All
-add code or expression in a control source that compares txtCountAll to
txtRunSum. When they are equal, you are on the last record in the report.
 
D

Darryl

I'm doing this because I have a complex query. If I put anything on the
Page/Report header footer I get
the Multi-level group by clause is not allowed in a subquery.

So I thought if I could determine the last detail record, I could print some
info I need to print.
 
D

Duane Hookom

You can move the txtCountAll text box to the detail section and get the same
results.

You can add a text box to the detail section with a control source like:
=IIf([txtCountAll]=[txtRunSum],"Last Record",Null)
 
Top