I see what you're saying, and since the field is formatted as text, it
makes sense to me. I had wondered about that earlier today, becuase it
was the only thing that explained it.
Now, i'm just having issues with combining val and len.
I tried val(len([field]))>9 and I get data type mismatch...unless you
can't do it that way in a query. Creating a separate expression column
in the query and simply using >9 works though, just wanted to keep it in
the same column.
I was using this to see if there was a problem with my existing field. I
have a combobox that uses code to look for a record and if it finds it,
goes to that record. If it doesn't find it - it prompts you to create a
new record. Used to work fine when i had my 5 test records in the db.
But once i added the old data - it doesn't work when the combo box has
an input mask. I was checking the fields to make sure there weren't
hidden characters or anything. I was starting to wondering if there was
really something wrong with the existing data for that field.
Still can't make the input mask part work, but that's another issue
Thanks!
mike
You probably have alphanumerical value.
'AZ' comes before 'Z', right? so '19' comes before '9' (change A
with 1 and Z with 9).
'19' < '9'
but
19 > 9
and
'19' > '09'
You can try
val( fieldstring) < 9
where the pre-defined function val returns the number starting the
string:
? val( "10abc" )
10
Next time, be sure you are using values, not strings
Vanderghast, Access MVP
Last I checked, 10 was MORE than 9.
How can the string actually return a value of 10 in one area and be
listed in a query using <9 ??