G
Guest
I have an expression that was suggested by someone here a couple of years ago
and it has worked great. I use it to isolate the even or odd side of my
storage locations. I have always used it in a make table query (with no
criteria) and then worked with the data in the new table. Today I tried to
use it in a select query and when I tried to apply a criteria , E to seperate
the even side or O to find the odd, it came back with the message "Data type
mismatch in criteria field". The query works fine until I try to apply
criteria. I am using a linked table. It is a CSV file.
Here is the expression:
E-O: IIf(Val(Mid([location],InStr([location],"-")+1)) Mod 2=0,"E","O")
I kind of understand everything in this expression except "Mod 2=0", I
can't
seem to find anything about "Mod", is that a function?
Sample of the data from the field [location] B 123-159-A.
I have tried using "E, O, 0, 1, and 2" as the criteria and I always get the
above referenced error message.
Thanks, any help or suggestions will be greatly appreciated.
Sgurdon
and it has worked great. I use it to isolate the even or odd side of my
storage locations. I have always used it in a make table query (with no
criteria) and then worked with the data in the new table. Today I tried to
use it in a select query and when I tried to apply a criteria , E to seperate
the even side or O to find the odd, it came back with the message "Data type
mismatch in criteria field". The query works fine until I try to apply
criteria. I am using a linked table. It is a CSV file.
Here is the expression:
E-O: IIf(Val(Mid([location],InStr([location],"-")+1)) Mod 2=0,"E","O")
I kind of understand everything in this expression except "Mod 2=0", I
can't
seem to find anything about "Mod", is that a function?
Sample of the data from the field [location] B 123-159-A.
I have tried using "E, O, 0, 1, and 2" as the criteria and I always get the
above referenced error message.
Thanks, any help or suggestions will be greatly appreciated.
Sgurdon