• Query parameter is null (XP)

    Author
    Topic
    #441442

    I usually use Like [cboValue] and a union query with * to return all records but now I have a date field and this approach does not work. I remember that I used another method to do a similar thing years ago using an ‘or is null’ or something similar to get all the records if a parameter was left as null but I can’t make it work – can you steer me in the right direction.

    Viewing 0 reply threads
    Author
    Replies
    • #1060044

      Try the thread starting with post 336,509 . Everything you want to know about Union queries and using null values (not to mention empty strings).

      • #1060049

        Sorry that’s not what I’m after. In the solution I used a few years ago did not use a union query.

        The unbound form supplying the criteria was allowed to provide a null value and the query returned all records when supplied with a null.
        after much fluffing around I got it –
        WHERE (((tblRunner.Runner_Name)=[Forms]![frmCriteria]![cboRunner])) OR ((([Forms]![frmCriteria]![cboRunner]) Is Null))

    Viewing 0 reply threads
    Reply To: Query parameter is null (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: