Results 1 to 3 of 3
  1. #1
    wnicole is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    118

    Records w no data on report?


    I have a report that has budget, total spent then remaining for ea project.
    Then sum up the variances for all projects for the year. With me so far?
    Budget - Expenses = balance
    Ex: $100,000 $1000 $90,000

    However if the project has no expense it leaves the variance blank and not carry over the budget which makes the report inaccurate.

    Ex: $100,000 $0.00 Blank

    I still need the budget to carry over if there is no expense. I have the expense as default and am forced to keep adding one records to make sure it appears. I'm sure there is an automatic way I'm missing.

    Can u assist?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    sounds like you want the NZ function

    in other words if your sum(expenses) is null (because there are no expenses) you would want something like

    Budget - (nz(sum(expenses), 0)

    Any mathematical function that has a null value anywhere in it is likely to show up as a null value itself, what you're doing here is forcing the sum of your expenses to be 0 if there are no expenses for that particular budget line item.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Typically you can use the Nz() function around each value to replace Null with 0.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 09-24-2013, 06:02 PM
  2. Replies: 10
    Last Post: 08-29-2013, 09:21 PM
  3. Replies: 12
    Last Post: 08-14-2012, 07:06 AM
  4. Replies: 1
    Last Post: 03-07-2012, 09:00 AM
  5. Replies: 4
    Last Post: 12-13-2010, 05:33 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