Query

D

Dennis

In a query, I am extracting several codes that are in one
field through three expressions that puts a value for each
in its own query field. "AM","PM" and "HS".

Example of the expressions:

SIGAM: IIf(Right(Space(3) & [SIG1],3)="QAM","AM")

SIGPM: IIf(Right(Space(3) & [SIG1],3)="QPM","PM")

SIGHS: IIf(Right(Space(3) & [SIG1],3)="QHS","HS")

The problem I am having is I only want those records in
the result of the three expressions and not the rest. when
I try to limit the query I either get records that only
have all three values or all the records including the
records I do not want. How can I get only the records that
have the desired value in one, two or three of these three
fields and none of the other values?

Thanks,

Dennis
 
D

Deville

try
SIGAM: IIf(Right(Space(3) & [SIG1],3)="QAM","AM")

SIGAM: IIf(Right(Space(3) & [SIG1],3)="QAM","AM",[SIG1])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Query for Report 3
SQL in Report 2
Query not giving return 2
IIF Function Within A Query 6
Query filtering by Aggregate 3
IIF Statement #Error 4
criteria failure 7
Query Not Displaying All Main Table Records 1

Top