I'm creating a calculated field (Field3) in a query in MS Access. In this example, Field2 contains both numeric and character values. I want Field3 to contain only numeric values from Field2 and to convert all character values to Null values so that I can later perform calculations on Field3 as a numeric field. This is in an IIf function because I want Field3 to contain only values from Field2 if Field1 = "AA". This is what I tried typing in the Field row in the Query Design View:
Field3: IIf([Field1]="AA",[Field2]*1,NULL)
This works except where Field2 is a character value then Field3 reads "#Error" instead of being blank.
What is the proper syntax for assigning NULL values if the IIf condition is not met?