Place a hidden textbox in the detail section. Call it, say,
txtItemNo. In its control source, place the formula
=1
In its properties, set
Running Sum = Over All.
In the detail section's On Format Event place this IF statement.
Code:
If Me.txtItemNo = DCount("[Primary Key Here]", "Report's Record Source Here") Then
'Last Record. Do this.
Else
'Not the last record. Do that.
End If
Replace "Primary Key Here" and "Report's Record Source Here" with their actual values. Also replace my comments with actual code.