example:
field1 bblandscape, wallmart, kmart
field2 4,6,9
field3 5,7,6
field4 12,0,5
field5
if field2 > field3 then field5 = "Yes"
if field4 = 0 then field5 = "Yes"
can I add an if (iif) statement or switch statement to field5 in design view of a query and perform both these conditional statements together in some way. I am not writing the syntax right.
thank you
**** I RECIEVED THIS SOLUTION****
Try
field5: iif(field4 = 0, "Yes", iif(field2 > field3, "Yes", "No")
Now I want to be able to run the query and only show the records with "YES" in field5. I usually would put YES under field5 in criteria box in design view.
But its not working.
any ideas
Thank you
field1 bblandscape, wallmart, kmart
field2 4,6,9
field3 5,7,6
field4 12,0,5
field5
if field2 > field3 then field5 = "Yes"
if field4 = 0 then field5 = "Yes"
can I add an if (iif) statement or switch statement to field5 in design view of a query and perform both these conditional statements together in some way. I am not writing the syntax right.
thank you
**** I RECIEVED THIS SOLUTION****
Try
field5: iif(field4 = 0, "Yes", iif(field2 > field3, "Yes", "No")
Now I want to be able to run the query and only show the records with "YES" in field5. I usually would put YES under field5 in criteria box in design view.
But its not working.
any ideas
Thank you
Comment