Filtering records using iif statement
Hi everyone,
I have created a simple query based on one table in the QBD grid.
The query returns records for the following fields: [DepartmentCode], [DepartmentName],[ActivityCode], [Activity Name], and [Cost].
I have specified the following criteria, on the [ActivityCode] field - "like 61* or like 64* or like 66* or like 68* or like 69* or like 8*", to limit the records returned.
Here is what I am having trouble accomplishing:
When [ActivityCode] is like 8*, I want all values for [DepartmentCode] returned, but when [ActivityCode] is anything else, I want to eliminate those [DeptUnit] records that are like 19*, 9*, and 8*.
Please let me know if you need additional info.
Thanks in advance for your help.
Anlon
|