IIF checkbox isnull(?) issue

Posted on 2007-08-08
Last Modified: 2008-02-01
I have a query with a stack of these for different fields on my "picker" form:

Like Iif(IsNull([Forms]![frmJoblisttemp]![JobDescription]),"*","*" & [Forms]![frmJoblisttemp]![JobDescription] & "*")

They work very well by filtering if there is data in the "picker" field but I cant seam to work out how to achieve the same result with checkbox because a check box can't be null only true or false, there is no "ignore me and include both data types" option.

Can someone help me out please.
Question by:rexwithers
    LVL 46

    Expert Comment

    by:Wayne Taylor (webtubbs)
    So instead of Null, do you want to check for False?

        Like Iif([Forms]![frmJoblisttemp]![JobDescription],"*" & [Forms]![frmJoblisttemp]![JobDescription] & "*","*")


    LVL 9

    Expert Comment


    Expr1: IIf([Forms].[Form1].[Check30]=Yes,"The Box is Checked","The Box Is Not Checked")
    LVL 34

    Accepted Solution

    >because a check box can't be null only true or false,
    Sure they can - just not by default.  Set the Checkboxes "Tri-state" property to Yes.  You may need to do something else (ie something with conditional formatting on another control)to emphasise the difference between Null and False.

    LVL 1

    Author Comment

    OK, great idea... so if a triple state checkbox control is grey (the triple state) its value reports as null?
    LVL 34

    Expert Comment

    Yup, that's correct.
    LVL 1

    Author Comment

    Thanks heaps everyone

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    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…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    759 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

    8 Experts available now in Live!

    Get 1:1 Help Now