Solved Need to test 3 values to assign new value?

kawai6rr

Registered User.
Local time
Today, 12:23
Joined
Aug 26, 2009
Messages
21
I have 3 separate field counts and if all 3 counts come up as NULL then it needs to be an X or else nothing.

SQL:
NoPatOcc: IsNull( [P0_Count] And IsNull( [P1_Count] And IsNull( [P2_Count], "X", "")

wrong number of arguments?
 
Forgot the IIF ?
Plus you need to end the ISNULL function after each field name?
 
Hi. Just a guess but maybe try something like

Code:
IIf(Nz(Field1,"x") & Nz(Field2,"x") & Nz(Field3,"x")="xxx","X","SomethingElse")
 
Thanks for the responses with your input I was able to get it figured out.

NoPatOcc: IIF (IsNull([P0_Count]), IIf(IsNull([P1_Count]), IIf(IsNull([P2_Count]), "X", " ")))
 

Users who are viewing this thread

Back
Top Bottom