Text String Length

  • Thread starter Thread starter JimP
  • Start date Start date
J

JimP

I will be concatenating a number of invoice numbers into a comma delimited
string via code. The string may exceed 255 chars. Will it be truncated, or
is there anything I can do to exceed 255 chars?
 
It will be concatenated, I believe. You could set your variable as Memo type
to eliminate the string length - I don't remember if this will have
repercussions for searches or anything.

If you are exporting this information, you can write directly to a text file
via a Do Loop on the invoice numbers.
 
JimP said:
I will be concatenating a number of invoice numbers into a comma delimited
string via code. The string may exceed 255 chars. Will it be truncated, or
is there anything I can do to exceed 255 chars?


A VBA string variable can contain up to 2 billion
characters. The question then becomes, what are you going
to do with the string?

If you are going to stuff it into a text box on a form or
report, you will then be limited to 65,535 characters.

OTOH, there are things in a query (e.g. DISTINCT, GROUP BY,
ORDER BY, UNION) that will truncate a field to 255
characters. Using the Format property in a table/query memo
field or a text box control will also truncate a value to
255 characters.
 
Back
Top