Concatenate Query larger than 255 characters

Mtdew4243

Registered User.
Local time
Today, 13:11
Joined
Nov 2, 2015
Messages
14
Hello All,

I need to generate a concatenate around 262 characters. But when I try, my results get truncated. Is it possible to make a concatenate in long text?

I have created a simple Form to capture the carton id, and then 18 product serial numbers. I then created the concatenate query to capture all this data into a single field to be used to populate a PDF417 2D barcode to be applied on the outside of the Master Carton.

The in-line production capture of the carton id and the 18 serial numbers being boxed works slick and every 10 to 20 master packs, I run the concatenate query and my BarTender barcode program will see the new records and allow me to print the new Master Carton labels.

But, because of the 255 character restriction it truncates the last serial number.

Any ideas?

Thanks MtDew4243
 
According to https://bytes.com/topic/access/insights/601315-vba-data-types, a string variable should more than handle that many characters
The String Data Type
String is another very common data type; it stores values or numbers, but treats them as text. There are two varieties: fixed and variable. A fixed string can handle from 1 to 65,400 characters. To declare a fixed string, use the Dim statement in the form

Dim variablename As String * stringlength

In contrast, the variable String data type grows and shrinks as required to fit its stored value. By default, all String variables are of this type. To declare this type, use the Dim statement in the form

Dim variablename As String
If it's a field in a table that's restricting you, could you change its type from Text to Memo?
 
to capture all this data into a single field
A single Text field in a table is no greater than 255 chars. If you want to store longer text in a table, use a Memo field.
 
Thanks All!,

Once I created the "Join" field in my table as Long Text and performed an Update query, all is good.

When I first attempted a join, I was just creating it in a new query column and gave it the name Join (w/o having it in any table) before typing the formula. Doing it that way, the query must default it to Short Text.

Mtdew4243
 

Users who are viewing this thread

Back
Top Bottom