Results 1 to 3 of 3
  1. #1
    polis is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    20

    calculated field displays value only if all the values are complered

    Hello guys sorry if my question seems silly but i cant find thee way out of it.

    Basically i have a field that calculates the sum of other subtotals like this:



    =[SubTotal1]+[SubTotal2]+[SubTotal3]

    But the value appears only if every subtotal has a value, i want it to still show the value if for example subtotal 2 has no value in it.

    I try to set the default property of the subtotals to 0, but nothing happens.

    p.s there are some cases where the value appears and dissapears.

    thanks in advance

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    look up the nz() function
    =nz(subtotal1, 0) + nz(subtotal2, 0) + nz(subtotal3, 0)

  3. #3
    polis is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    20
    thanks a lot that is exactly what i was looking for...

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

Similar Threads

  1. Calculated Field (if/then) Help
    By agent- in forum Programming
    Replies: 10
    Last Post: 03-30-2011, 05:43 PM
  2. Calculated Field Help
    By Alex Motilal in forum Queries
    Replies: 2
    Last Post: 01-06-2011, 04:54 AM
  3. Calculated field
    By nashr1928 in forum Forms
    Replies: 9
    Last Post: 08-01-2010, 01:59 PM
  4. Field displays number instead of value
    By rdueck in forum Reports
    Replies: 6
    Last Post: 02-25-2010, 08:19 PM
  5. Control source and calculated values
    By meistersteff in forum Forms
    Replies: 0
    Last Post: 11-23-2007, 07:04 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