Last Value

R

Ruben Granados

Is there a way to know when the last record of the Details
section is being sent?
I want to catch it on the Details on format event.
For my design I need to set the move layout to False. but
i need also to send values to some unbound text to avoid
this values to be overlapped I need something like:

If me.LastRecord = True Then
.... set values
End if

thx
 
A

Allen Browne

Access does not give you this information.

As a workaround, use the Open event procedure of the report to lookup the
primary key value for the last record into a module-level variable (one
declared at the top of the module with the option statements).

Adjusting for any sorting or filtering is the toughest part: unfortunately
Access fails to set the report's FilterOn property correctly, so you cannot
tell whether the string in its Filter property is actually applied or is an
artifact from a previous occasion.
 
G

Guest

I've tried setting the values from the Group Footer Format
event. But no data is set. This happens because is not
possible to set data from the Footer to the details
section or is a syntax mistake?
my sintax:

Private Sub GroupFooter0_Format(Cancel As Integer,
FormatCount As Integer)
.....
Me.txtNo1 = Value 1
Me.txtNo2 = Value 2
....

End Sub

Thank you for your response.
 
A

Allen Browne

What you are attempting should work if:
- txtNo1 is unbound (no control source), and
- it is in the GroupFooter0 section (the section being formatted).
 
Top