Results 1 to 4 of 4
  1. #1
    Huddle is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2010
    Posts
    318

    Help on Calculation

    I am trying to put zeros in the blank field of a report. I've tried this calculation as well as others but it is not producing the results. This is in a query. Can you help correct it?



    Assessments In Progress: (IIf([CountOfDistrict]="","0",[CountOfDistrict]))

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I suspect that count district is returning a null not "". Try simply

    Nz([CountofDistrict],0)

    The Nz() function will replace a Null value with the second argument.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,819
    Count of something implies it is numeric, so ?
    IIf([CountOfDistrict]= 0,0,[CountOfDistrict])

    On second thought, maybe not as that doesn't make a whole lot of sense even if it worked. Whatever the calculated field name is, if it's numeric its expression might just as well be CountOfDistrict
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Huddle is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2010
    Posts
    318
    Got it working with the Nz([CountofDistrict],0) formula. Thanks for your help

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

Similar Threads

  1. Sum If Calculation Help
    By CT_AccessHelp in forum Access
    Replies: 8
    Last Post: 03-08-2016, 10:13 AM
  2. How to do this calculation
    By rickroller5 in forum Access
    Replies: 4
    Last Post: 09-07-2014, 01:22 PM
  3. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  4. How to do calculation???
    By latestgood in forum Forms
    Replies: 0
    Last Post: 05-18-2011, 11:11 AM
  5. value calculation
    By kyle in forum Access
    Replies: 3
    Last Post: 03-06-2011, 12:29 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