Why cant MS Access 2007 give result of =count([text])+Sum([number])

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Davy
    New Member
    • Aug 2010
    • 3

    Why cant MS Access 2007 give result of =count([text])+Sum([number])

    The actual expression is
    Code:
    '=(Count([AttendanceDate]))+(Count([BIBLEDATE]))+(Count([MEMORYTEXTDATE]))+(Count([VISITORDATE]))+((Sum([Quiz])))'
    When Quiz value is null/zero, the total is not generated
    Last edited by Niheel; Aug 26 '10, 07:31 AM.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Please provide the full query and what you are trying to do

    Comment

    • Davy
      New Member
      • Aug 2010
      • 3

      #3
      I have done a report on students. I can total all the dates they have attended, brought their bibles, said their memory text. Access can total these ok. Trouble is I have added a numeric field "Quiz". When I try to add this field to their total score I get no total. as soon as it is excluded from the total I get results.
      Code:
      =(Count([AttendanceDate]))+(Count([BIBLEDATE]))+(Count([MEMORYTEXTDATE]))+(Count([VISITORDATE]))+((Sum([Quiz])))
      Last edited by Niheel; Aug 26 '10, 04:52 PM. Reason: please use code tags

      Comment

      • code green
        Recognized Expert Top Contributor
        • Mar 2007
        • 1726

        #4
        It looks OK.
        What result do you get with just
        Code:
        =((Sum([Quiz]))
        It looks like this is returning an invalid result such as NULL.
        If you have NULL values in [Quiz] they might be better as zero

        Comment

        • Davy
          New Member
          • Aug 2010
          • 3

          #5
          Null Values

          I found the issue. I would get no total if Quiz was null. I have now set the default for this field to be Zero, I also updated the entire table to change all null values to zero. The totals are now all ok.

          Thanks CG

          Comment

          Working...