[AccessD] storing last item on the page

Susan Harkins ssharkins at gmail.com
Tue Nov 6 13:51:59 CST 2007


I have four unbound text controls -- two in the header and two in the 
footer -- to display the first and last items on each page.

I've got three of them working as follows:

I use the control's Control Source property to display the first item in the 
header and the last item in the footer. I use the following to update the 
footer's first item.

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As 
Integer)
  'Store first item on page for footer.
  Dim strFirst As String
  strFirst = Me.txtHeaderFirst
  Me.txtFooterFirst = strFirst
End Sub

I tried the following to update the header's last item, but it doesn't work:

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As 
Integer)
  'Return last item on each page for header.
  Dim strLast As String
  strLast = Me.txtFooterLast
  Me.txtHeaderLast = strLast
End Sub

The first page displays nothing and all subsequent pages display the last 
item from the previous page, not the current page.

How do I grab the last item on the current page?

Susan H. 




More information about the AccessD mailing list