Results 1 to 4 of 4
  1. #1
    cmiyatake is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    28

    count function on a report field is incorrect


    I have a query that sets up my report wherein I also have grouped in the query a field as "Count". When I run the query, the field that is grouped has "1" in each corresponding field. Normal. When I go to the design mode of the report that is sourced by the query, I place the Count field in the report footer but the calculation is incorrect. When it should be 45 it is 1. What am I doing wrong? Should it not count each "1" associated with the count field and give me a total count of 45?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Exactly what is the expression used in textbox? If it is just bound to field in query then of course it will only show value from query, it is NOT doing a count on the report.

    Expression in textbox either: Sum([fieldname]) or Count(*)

    Alternatively, don't aggregate in query, do it on report. This allows display of detail records as well as summary calcs.
    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
    cmiyatake is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    28
    Thanks. solved my problem. A slight difference in how to add a count field in a 2016 report vs what I have been used to. Got it now.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    How is it different?
    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: 1
    Last Post: 01-22-2018, 03:55 PM
  2. count function for report from query
    By Simonhtc4 in forum Queries
    Replies: 5
    Last Post: 03-20-2017, 08:40 AM
  3. Replies: 3
    Last Post: 01-04-2015, 03:00 PM
  4. Using "Count" function in a report footer
    By GraeagleBill in forum Reports
    Replies: 5
    Last Post: 05-11-2013, 03:42 PM
  5. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 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