count records per page in ms access

I have an access report that i would like to count how much records on the page starting with the number 1.
Who is Participating?
hnasrConnect With a Mentor Commented:
One way:
Text box in detail:
    name: recSum ,  controlSource=1, Running Sum over all, visible: no

Text boxes in page footer:
    name: recPrev,  visible: no
    name: recPage

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
    Me.recPage = Me.recSum - Nz(Me.recPrev, 0)
    Me.recPrev = Me.recSum
End Sub

Open in new window

Rey Obrero (Capricorn1)Commented:
in the report, create an unbound textbox
set the control source to =1

set the Running Sum to Over All or over group
SvgmassiveAuthor Commented:
that's no what i am looking for i am looking for a page total not a running sum nor group total.thanks
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Rey Obrero (Capricorn1)Commented:
can you elaborate the page totals you are looking for.

better upload a sample db and explain what you want to see in the report
SvgmassiveAuthor Commented:
count how many records per page if  there's 10 records on a page the text box show display 10,if there's 8 then it should say 8, not looking for a running sum or group total.
running sum would be 18,if there one  group it would be 18 also and that's not what i am looking for i have those already.Thanks
i have no grouping levels on the report.
You'll have to do this in VBA.

Take a look at this article for the code, under the heading "Placing a Count in a Page Header or Footer":
Rey Obrero (Capricorn1)Commented:
Did you actually take the time to read the article or did you simply "pick an answer' to close the question, get it off of your abandoned questions list, in order to get past the site's automatic lock so that you could post your new question?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.