Results 1 to 11 of 11
  1. #1
    VicM is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2017
    Location
    US-PA & FL
    Posts
    55

    Show total Count of rows in query on each page

    Hi,
    Using Access 2010 on a Win 11 Pro box.
    I'd like to show the total number of items in the query I'm using as the Record Source on each page. When I use the Count function in a calculated control in the Page Footer, I get an error. But if I put that same control in the Report Footer, I get the number of items in the query.

    As a bit of background: when I generate the report I then save it as a PDF so I can send it to my phone. One of the reports I generate has only one page of info. But the other has about 13 pages and can grow over time. So I'd like to see how many records are in the report without necessarily having to scroll down to the last page of that PDF.



    Any thoughts?

    Thanks,
    Vic

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Textbox in page footer has expression that references textbox in report footer: =tbxTotal

    Might want some code that will hide page footer textbox on last page. I'm not sure what that would be.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    I might put it at the top if the only important thing in a phone view was the record count.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    VicM is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2017
    Location
    US-PA & FL
    Posts
    55
    June7
    Great suggestion!!
    I put a text box in the Report Footer, put the =Count(*) in its Control Source, set its height to 0", reduced the size of the Report Footer to nothing. Then put a text box in the Page Footer and referenced the text box in the Report Footer.
    Works like a charm.
    Thanks again.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Micron has a good point. Unless you want to see this count on every page, could just have Sum() in report header.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    VicM is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2017
    Location
    US-PA & FL
    Posts
    55
    June7,
    Yes. I do want to be able to see the total count on each page. As I said above, your suggestion allowed me to get the result I wanted.
    Thanks again,
    Vic

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Along same line, placing in page header might reduce scrolling.
    Great idea on setting textbox and report footer heights to 0.
    Could set the report footer textbox not visible. That alone will not allow report footer to be 0 height but would allow other stuff to be displayed in footer if that need arises.


    Last edited by June7; 04-12-2024 at 12:22 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Quote Originally Posted by VicM View Post
    June7
    Great suggestion!!
    I put a text box in the Report Footer, put the =Count(*) in its Control Source, set its height to 0", reduced the size of the Report Footer to nothing. Then put a text box in the Page Footer and referenced the text box in the Report Footer.
    Works like a charm.
    Thanks again.
    When I do that I get the same value as the report footer on each page?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    That's exactly what OP wants. "I'd like to see how many records are in the report without necessarily having to scroll down to the last page of that PDF"



    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Quote Originally Posted by June7 View Post
    That's exactly what OP wants. "I'd like to see how many records are in the report without necessarily having to scroll down to the last page of that PDF"
    Ah, misunderstood. I thought it was like a running count, so 20 on first page, 52 on second etc.

    In that case I would have gone with Micron's suggestion, saves even scrolling down to the bottom of the first page on a phone.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    I know how to do a count on each page but a running count is a new challenge.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-26-2021, 09:32 PM
  2. Replies: 1
    Last Post: 03-06-2017, 06:48 AM
  3. Show % of current rows in total rows.
    By redbull in forum Programming
    Replies: 8
    Last Post: 03-29-2016, 09:26 AM
  4. Replies: 2
    Last Post: 04-15-2014, 01:59 PM
  5. Replies: 1
    Last Post: 01-24-2011, 03:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums