MS Access  2013

Posted on 2014-08-27
Last Modified: 2014-09-07
I would like to know what formula I can use in Query calculated field for the attach example.
I would like to use  the formula where it will give me Calculated field result. "iif Status column has "N/A" then 0 otherwise give me number in the status field".

ID   Name     Status     Calculated field
12  John        100              100
13  Chris        N/A               0
14  Mathe    345               345
15  Sam        N/A              0
Question by:snhandle
    LVL 2

    Expert Comment

    by:Priya Sudharsan
    Refer the attached excel sheet. Just click on the "Calculated field" and see the formula.
    LVL 47

    Accepted Solution


    Supposing Status is a text field

    pls try




    LVL 22

    Assisted Solution

    by:Kelvin Sparks
    If you need a numeric output

    IIf([Status] Is Null, 0, CInt([Status])) if the remaining values are integers,. Replace CInt with CLng if the numbers can exceeed 32767, or use CDbl if you want decimals or really large numbers.

    LVL 48

    Assisted Solution

    by:Gustav Brock
    I would use:



    Author Closing Comment


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now