Query Criteria

MICHELE

Registered User.
Local time
Today, 22:10
Joined
Jul 6, 2000
Messages
117
My query has multiple and/or criteria.
The first row in my query has several fields based on fields on a form.
The second line has all of the same except the last 2 fields.
I want the last 2 fields to check if the field on the form is Null. If the field is Null then I don't want Criteria in that field, if it is not null then I want the criteria to be the contents of the field on the form.

I tried:
IIf([Forms]![F-STRUCBLDLSCSCOPE]![ComboBUILDTYPE]="",Null,[Forms]![F-STRUCBLDLSCSCOPE]![ComboBUILDTYPE])


:confused:
 
It appears you want your field to contain what it currently contains, i.e.
If it's now null, you want it remain that way and if it contains data you want it to retain the data

If that's the case, there's no need to address it in the query.

Have I missed something?
 
I tried the criteria you gave me Pat, and it still didn't work.
It doesn't show anything.


If my field [ComboBUILDTYPE] on my form is empty then I don't want any criteria to be used in my query (I want to show all the BUILDTYPEs). But if someone looks up a BUILDTYPE in my combo box then I want that BUILDTYPE to be the criteria to go with all the other criteria on that line.

Could I be using the and/or wrong?

:confused: :confused:
 
I got it to work. I just used the field name in the last part of my IIF so that it would show all the records in that field.

Thank you!
 

Users who are viewing this thread

Back
Top Bottom