IsError/IsNumber not working in query

brianb

Registered User.
Local time
Today, 23:12
Joined
Aug 24, 2002
Messages
15
Access 97
I am importing a text file containing lots of garbage. To remove this garbage I am writing a make table query that checks Field5 (which is a number as text) via a calculated field. If it produces an error then discard the record, keeping the ones that convert correctly to numbers.

The field calculation is :- Expr1:IIf(IsError(Val([20pages]![Field5])),0,1)
The idea is to exclude any record with a zero.

No matter how I try this I always get #Error in the field. The number itself always appears correctly as text, or a number if I use Val() - still with #Error as the alternative.

Or can I exclude records where the field contains #Error ?

Thanks for any help.
 
Expr1: IIf(IsNumeric([20pages]![Field5]),0,1)
 
Works fine thanks.
I am "sure" I tried that - not exactly I suppose.
Another 10 hours I might have got it.
 
brianb said:
I am "sure" I tried that - not exactly I suppose.

From your thread's title - you probably tried IsNumber ;)
 

Users who are viewing this thread

Back
Top Bottom