Match criteria against a field

T

TKM

How would I go about setting up this criteria?

I have two fields from the same table
LOB_CLASS and IRS_CD. If LOB_CLASS = "61" and IRS_CD is not equal to "4"
then show W2 in a made up field named "1099/W2". If the above is different in
anyway then show "1099" in the "1099/W2".

Thank you in advance
 
J

John Spencer

TRY the following

Field: [1099/W2]: IIF(LOB_Class = "61" and IRS_CD <> "4", "W2","1099")

If LOB_Class and IRS_DC are number fields and not text fields, then

Field: [1099/W2]: IIF(LOB_Class = 61 and IRS_CD <> 4, "W2","1099")
 
K

KARL DEWEY

Try this --
SELECT TKM.LOB_CLASS, TKM.IRS_CD, IIf([LOB_CLASS]="61" And
[IRS_CD]<>"4","W2","1099") AS [1099/W2]
FROM TKM;
 
T

TKM

Perfect thanks again!

KARL DEWEY said:
Try this --
SELECT TKM.LOB_CLASS, TKM.IRS_CD, IIf([LOB_CLASS]="61" And
[IRS_CD]<>"4","W2","1099") AS [1099/W2]
FROM TKM;


TKM said:
How would I go about setting up this criteria?

I have two fields from the same table
LOB_CLASS and IRS_CD. If LOB_CLASS = "61" and IRS_CD is not equal to "4"
then show W2 in a made up field named "1099/W2". If the above is different in
anyway then show "1099" in the "1099/W2".

Thank you in advance
 
Top