max length of form recordsource property?

L

ljb

What is the max length for a form's recordsource property? I'm using Access
2000 and need SQL of 445 characters long. I'm thinking its not working
because of my length. The property is being set by vba code based on some
user selections.

thanks
LJB
 
A

Albert D.Kallal

Try placing a

debug.print strSqlvar

then, go to the debug window, and take the sql, and paste it into a query to
see if it works....

(of course, replace the strSqlvar with whatever var have in code that
contains the sql).

does the query work if you cut and paste from the debug window to the query
builder....

I believe you can go to a least 2000 chars..
 
L

ljb

Albert D.Kallal said:
Try placing a

debug.print strSqlvar

then, go to the debug window, and take the sql, and paste it into a query to
see if it works....

(of course, replace the strSqlvar with whatever var have in code that
contains the sql).

does the query work if you cut and paste from the debug window to the query
builder....

I believe you can go to a least 2000 chars..

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
[email protected]
http://www.members.shaw.ca/AlbertKallal

You are correct. It is not the limit of the RecordSource property. It can
accept my 440+ character SQL string if I paste it in debugger. I discovered
my table bound list box of my query choices and SQL statements is the
problem. I show column 1 on the form and read the SQL from column 2. For
some reason Me.lstShows.Value truncates the string. Perhaps the list box has
a 255 character limit.

thanks
LJB
 
D

Dirk Goldgar

ljb said:
You are correct. It is not the limit of the RecordSource property. It
can accept my 440+ character SQL string if I paste it in debugger. I
discovered my table bound list box of my query choices and SQL
statements is the problem. I show column 1 on the form and read the
SQL from column 2. For some reason Me.lstShows.Value truncates the
string. Perhaps the list box has a 255 character limit.

Yes, it does. The columns of a list box max out at 255 characters.
 
Top