Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Oct 2002
    Location
    New Salem, North Dakota, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sum (Access 2003)

    This is probably an extremely easy one...but I am trying to calculate 2 fields...sometimes one is blank and I do not get a value...what do I need to do so that I always get a value?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sum (Access 2003)

    You can use the Nz function for this. The expression Nz([SomeField], 0) will return the value of SomeField if this is not null (blank), and 0 if SomeField is null.

    Example: Nz([Field1], 0) + Nz([Field2], 0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •