Exceeding 255 Character Length

P

pas926

I have a query where I have a large criteria in this form "3499" Or "3408" Or "3411" etc for about 35 numbers. I get an error message stating that it is an invalid string and I have exceeded the 255 character length. Is there any way to do this differently. The numbers are not sequential. Any help is appreciated. I'm using Access 2000. Thanks in advance Paul
 
D

Dan Artuso

Hi,
You can try using the IN predicate.

Where yourField IN(3499,3408, etc)

--
HTH
Dan Artuso, Access MVP


pas926 said:
I have a query where I have a large criteria in this form "3499" Or "3408" Or "3411" etc for about 35 numbers. I get an error
message stating that it is an invalid string and I have exceeded the 255 character length. Is there any way to do this differently.
The numbers are not sequential. Any help is appreciated. I'm using Access 2000. Thanks in advance Paul
 
G

Gary Walter

pas926 said:
I have a query where I have a large criteria in this form "3499" Or "3408" Or
"3411" etc for about 35 numbers. I get an error message stating that it is an
invalid string and I have exceeded the 255 character length. Is there any way to do
this differently. The numbers are not sequential.

Hi Paul,

In addition to Dan's sage advice,
I might approach it differently by
creating a tblCrit.

However you get the numbers for
your criteria,

clear tblCrit and fill with these numbers.

Then join tblCrit in your query.


Good luck,

Gary Walter
 
Top