IN predicate limit?

  • Thread starter backToASP via AccessMonster.com
  • Start date
B

backToASP via AccessMonster.com

I have an application that is Access as a Reporting frontend for an old
FoxPro system - has been running successfully for a couple of years. There
is a multi select list box with 100+ reps listed (details from linked foxpro
data) - the user is selecting about 35 reps, a date range, and various other
filtering options. She is getting 'SQL Expression' error - my guess is the
IN predicate string is too long. The code builds an IN() predicate statement
based on the rep selection. Is there a limit to the number of items in the
IN statement?

TIA
 
S

Stuart McCall

backToASP via AccessMonster.com said:
I have an application that is Access as a Reporting frontend for an old
FoxPro system - has been running successfully for a couple of years.
There
is a multi select list box with 100+ reps listed (details from linked
foxpro
data) - the user is selecting about 35 reps, a date range, and various
other
filtering options. She is getting 'SQL Expression' error - my guess is
the
IN predicate string is too long. The code builds an IN() predicate
statement
based on the rep selection. Is there a limit to the number of items in
the
IN statement?

TIA

That depends on the length of each item inbetween the parens. In the past
I've built In()'s with 1000 or so autonumber primary keys, none of which
exceeded 5 chars in length. To pack more in, use a comma as the separator,
not comma space. I've never seen any docs that give the actual limit,
though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top