There is also a VBA function, IsNumeric( ) which will evaluate a value that
is passed to it to determine whether it is numeric or not.
What happens if they really screw it up and don't enter at least 12
characters?
Dale

Signature
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
> >Can somebody help me with a problem I have?
> >
[quoted text clipped - 33 lines]
> You can then filter those out records by using a criteria of
> False.
John Spencer - 27 Mar 2008 20:25 GMT
I also thought of IsNumeric; HOWEVER. IsNumeric will return True for
"12345-". It treats that as a negative number. Also strings such as
"1234e5" and "123d12" will return true.
I think Marshall's solution is best if you want to ensure that no other
characters beyound 0 to 9 are in the string.

Signature
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> There is also a VBA function, IsNumeric( ) which will evaluate a value
> that
[quoted text clipped - 46 lines]
>> You can then filter those out records by using a criteria of
>> False.
Ernie - 27 Mar 2008 21:28 GMT
Yes Marshall's answer was just what I needed. Once I changed the starting
and end point of the mid string it worked just great.
Mid([filename],5,7) Like "*[!0-9]*" returned:
007684.
112414-
C111354
Only the records that should not be imported. Perfect! Thanks all!
> I also thought of IsNumeric; HOWEVER. IsNumeric will return True for
> "12345-". It treats that as a negative number. Also strings such as
[quoted text clipped - 53 lines]
> >> You can then filter those out records by using a criteria of
> >> False.
Marshall Barton - 28 Mar 2008 06:29 GMT
>There is also a VBA function, IsNumeric( ) which will evaluate a value that
>is passed to it to determine whether it is numeric or not.
>
>What happens if they really screw it up and don't enter at least 12
>characters?
>Dale
Dale,
Not only does IsNumeric allow leading and trailing plus,
minus and dollar signs, but it also recognizes all the legal
representations of floating point numbers. Some examples
are 2D3, 14E15, 1.2D+3-$, etc.
All that IsNumeric is good for is to check if a single
character is a digit or if a string can be **converted** to
some kind of numeric type value.

Signature
Marsh
MVP [MS Access]
Dale Fye - 28 Mar 2008 13:32 GMT
Thanks Marsh/John,
I knew it had its limitations, but didn't consider the ramifications WRT
this particular situation. I knew about the scientific notation, but what
is the 2D3 or 1.2D+3 representation mean (is that some sort of currency
representation)?
Dale
>>There is also a VBA function, IsNumeric( ) which will evaluate a value
>>that
[quoted text clipped - 14 lines]
> character is a digit or if a string can be **converted** to
> some kind of numeric type value.
John Spencer - 28 Mar 2008 14:46 GMT
I don't really know. I think it is supposed to represent Decimal, but ...
It seems to pretty much behave as scientific notation.

Signature
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> Thanks Marsh/John,
>
[quoted text clipped - 23 lines]
>> character is a digit or if a string can be **converted** to
>> some kind of numeric type value.
Marshall Barton - 28 Mar 2008 16:01 GMT
That's kind of a holdover type specifier in some variations
of the Basic language. E implied Single and D implied
Double. Access accepts either syntax, but converts both to
Double.

Signature
Marsh
MVP [MS Access]
>I knew about the scientific notation, but what
>is the 2D3 or 1.2D+3 representation mean (is that some sort of currency
[quoted text clipped - 13 lines]
>> character is a digit or if a string can be **converted** to
>> some kind of numeric type value.