max length of form recordsource property?

  • Thread starter Thread starter ljb
  • Start date Start date
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
 
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 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
(e-mail address removed)
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
 
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.
 
Back
Top