Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple criteria in filter 2

Status
Not open for further replies.

Hyun

MIS
Jun 21, 2001
1
US
I'm trying to create a continuous report in Access97 where if a certain group of fields are null, then they will be filtered out and not appear on the report. I was able to use the Filter Property to filter out records with only one criteria by using

IsNull([Field1]) = False

But I need something like

IsNull([Field1]) = False AND IsNull([Field2]) = False AND IsNull([Field3]) = False

Alas this does not work. I think it's because I'm using the wrong syntax. Any ideas on how to resolve this will be greatly appreciated.
 
You're close. If you want to filter out only records where ALL items are NULL, use this:
[tt]
((IsNull([Field1]) = False) AND (IsNull([Field2]) = False) AND (IsNull([Field3]) = False))
[/tt]
If you want to filter out records where ANY item is NULL use this:
[tt]
((IsNull([Field1]) = False) OR (IsNull([Field2]) = False) OR (IsNull([Field3]) = False))
[/tt]
Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top