Tags: access, built, column, database, datain, iunderstand, microsoft, mysql, oracle, print, sql, sum, zero

Sum and Nz

On Database » Microsoft Access

829 words with 1 Comments; publish: Sun, 01 Jun 2008 14:10:00 GMT; (25062.01, « »)

Hi,

I want to get a sum of a column, but if there is no data

in the column i would like to print out a zero. Now, i

understand that there is a built in function Nz in

Access, but could i use it in my report?

Thanks,

Ilan

All Comments

Leave a comment...

  • 1 Comments
    • Ilan wrote:

      >I want to get a sum of a column, but if there is no data

      >in the column i would like to print out a zero. Now, i

      >understand that there is a built in function Nz in

      >Access, but could i use it in my report?

      Sure, the expression would be:

      =NZ(Sum(columnname))

      Or, you can leave it as you have it and set the text box's

      Format property to display 0 instead of nothing when the sum

      is Null. For integer values the format could be as simple

      as:

      0;;;\0

      Marsh

      MVP [MS Access]

      #1; Sun, 01 Jun 2008 14:12:00 GMT