Iif function with multiple conditions (1 Viewer)

lemondrop9344

New member
Local time
Today, 14:40
Joined
Feb 11, 2018
Messages
5
I am trying to evaluate the contents of a field entitled FASITYTPE from a database created by another entity. The field will contain a value of 1, 2 or 3.
If the value is 1, I want to add 2688876544 to create a field entitled SERIALNUMBER and place it in a field entitld TXID. If the value is 2, I want to add 2600468480 to the SERIALNUMBER and place it in the TXID field. If the value is 3, I want to place TYPE 3 in the TXID field.
This is (along with other variations) is what I am trying to get ACCESS to process:

TXID: IIf([FASITETYPE]=1,([SERIALNUMBER]+2688876544),IIf([FSAITETYPE]=2,([SERIALNUMBER]+2600468480),"TYPE 3"))

When I run the query, I am prompted for a FASITYTPE parameter. It's been a while since I've played around with ACCESS. Please help me to understand where I've messed up with my statement.

Thanks in advance for any help.
 

plog

Banishment Pending
Local time
Today, 16:40
Joined
May 11, 2011
Messages
11,645
Is there a FASITYTPE field in any of the datasources that compose the query? The query can't find that field.
 

lemondrop9344

New member
Local time
Today, 14:40
Joined
Feb 11, 2018
Messages
5
Thanks for the quick response. Feel sort of foolish now.
I was sure I had the field name typed into the statement correctly, obviously, the eyes see what they want to see instead of what is actually there.
Your response triggered me to look at the statement with a little more objectivity.:confused::confused::banghead:
 

Users who are viewing this thread

Top Bottom