C
Chris Fromm
This is the query I'm trying to run:
1AA: IIf((Len([1stArrival]=6),
Val(Mid([1stArrival],3,2))),
IIf(Len([1stArrival]=7),
Val(Mid([1stArrival],4,2))))
The idea is to create a field called [1AA], which will
populate based on the field [1stArrival]. Since the
length of the strings in field [1stArrival] varies
between 6 and 7 characters or spaces, I'm using an IIF
statement cover both possibilities.
Each segment of the query works fine by itself, but when
I join them together (with a comma), I get an error. The
error says "Syntax error (comma) in query expression."
I've tried ways to get around it, but no go. Does anyone
know how to cover both conditions in the same query?
Thanks!
1AA: IIf((Len([1stArrival]=6),
Val(Mid([1stArrival],3,2))),
IIf(Len([1stArrival]=7),
Val(Mid([1stArrival],4,2))))
The idea is to create a field called [1AA], which will
populate based on the field [1stArrival]. Since the
length of the strings in field [1stArrival] varies
between 6 and 7 characters or spaces, I'm using an IIF
statement cover both possibilities.
Each segment of the query works fine by itself, but when
I join them together (with a comma), I get an error. The
error says "Syntax error (comma) in query expression."
I've tried ways to get around it, but no go. Does anyone
know how to cover both conditions in the same query?
Thanks!