Results 1 to 4 of 4
  1. #1
    Daisy509th's Avatar
    Daisy509th is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Central Texas
    Posts
    51

    Need zeros so that it will add right!!!

    Good Morning,

    I have a query with a field(Not sure what the field is called) that i have the query make on the fly. The field has this formula in it "YTD: [Qtr1Final]+[Qtr2Final]+[Qtr3Final]+[Qtr4Final]" which works perfectly as long as I have values in each field in the formula. I dont really know how to fix this the best way but am sure if those fields had "0" in them if no other value is present then my formula would work.

    Thanks for all the helpAttachment 33086Attachment 33087Attachment 33088

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Surround each item with Nz(fieldname,0)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    Daisy509th's Avatar
    Daisy509th is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Central Texas
    Posts
    51
    YTD: [Nz(Qtr1Final,0)]+[Nz(Qtr2Final,0)]+[Nz(Qtr3Final,0)]+[Nz(Qtr4Final,0)]

    I have done something wrong.

    Thanks

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Get rid of all square brackets
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Problem with zeros
    By jtm013 in forum Queries
    Replies: 19
    Last Post: 05-15-2015, 10:51 AM
  2. Do not add leading zeros
    By phifer2088 in forum Access
    Replies: 5
    Last Post: 03-02-2015, 10:05 AM
  3. Leading Zeros
    By dirtbiker1824 in forum Access
    Replies: 1
    Last Post: 03-14-2011, 02:16 PM
  4. Hiding Zeros
    By Alex Motilal in forum Reports
    Replies: 2
    Last Post: 08-06-2010, 08:28 AM
  5. Getting rid of zeros
    By ceb39 in forum Reports
    Replies: 26
    Last Post: 05-31-2009, 12:49 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