Using Val function with Null

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I am quite new to Access 2002 and know very little SQL or Visual Basic

I have a field for length (field name is a) in my database; this field is Text because I want to store trailing zeros (these are important for precision for another reason). I want to run a query to select all lengths greater than 10 (for example). When I use the criterion Val(a) > 10 I get the error message "Data type mismatch in criteria expression", which I have concluded is due to Null values in a

I then tried using the criterion In (SELECT a from [Crystal Data] Where a Is Not Null AND Val(a)>10
but get the same error; apparently the second half is still evaulated even if the first half if false

Any suggestions

Thank
Alic
 
Thanks for the suggestion, it set me on the right track (once I got those brackets in the right place

Alice
 
Back
Top