Any way to get around the 255 character limit on merge fields fromAccess=>Word?

  • Thread starter Thread starter Phil Walsh
  • Start date Start date
P

Phil Walsh

Hi,

I've got a query which in one field contains a concatnated list of other
values that is generated by a function I wrote. The function works fine,
and I get all the relevant infgo whan I view the query in access.
However, when I try to use the field as a data source for a merge in
Word, everything after cahracter 255 is lost.

Is there any way I can get around this limitation? I'm using Office XP Pro.

Thanks,

Phil Walsh
 
Hi Phil,

As far as I can remember the way to do this is to use a temporary table
with a memo field. Change your query into an append query and run it to
populate the table; then use this table (or a simple query on it) as the
data source for the merge; finally run a delete query to empty the table
ready for next time.

An alternative approach could be to set things up so the fields are
never longer than 255 characters, and concatenate them in Word by simply
using adjacent mergefields (<<Part1>> <<Part2>> ...)
 
John said:
As far as I can remember the way to do this is to use a temporary table
with a memo field. Change your query into an append query and run it to
populate the table; then use this table (or a simple query on it) as the
data source for the merge; finally run a delete query to empty the table
ready for next time.

Thamks - that did the trick - although it is a very unelegant solution
:) Doesn't matter once it works anyway.

Thanks again.

Phil Walsh
 
Could you please post an example of the code for this
solution? Thanks!

-----Original Message-----
Hi Phil,

As far as I can remember the way to do this is to use a temporary table
with a memo field. Change your query into an append query and run it to
populate the table; then use this table (or a simple query on it) as the
data source for the merge; finally run a delete query to empty the table
ready for next time.

An alternative approach could be to set things up so the fields are
never longer than 255 characters, and concatenate them in Word by simply
using adjacent mergefields (<<Part1>> <<Part2>> ...)


Hi,

I've got a query which in one field contains a concatnated list of other
values that is generated by a function I wrote. The function works fine,
and I get all the relevant infgo whan I view the query in access.
However, when I try to use the field as a data source for a merge in
Word, everything after cahracter 255 is lost.

Is there any way I can get around this limitation? I'm using Office XP Pro.

Thanks,

Phil Walsh

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Hi Micheline,

No code is necessary: you can do it all from the user interface. First,
create a new table (which will be your temporary table, I'll call it
tblTemp) with the necessary fields, including a memo field for your long
text field.

Then make a copy of your existing query, open it in design view and turn
it into an append query (select Append query from the Query menu) to
append the data to tblTemp. Run this query.

You now have the data you want to merge in tblTemp. Do the merge from
Word as usual.

Finally, create a delete query to delete all records from tblTemp. Run
this, and then compact the database. tblTemp is then ready to be used
again next time you need to do the merge: just run the append query
again.








Could you please post an example of the code for this
solution? Thanks!

-----Original Message-----
Hi Phil,

As far as I can remember the way to do this is to use a temporary table
with a memo field. Change your query into an append query and run it to
populate the table; then use this table (or a simple query on it) as the
data source for the merge; finally run a delete query to empty the table
ready for next time.

An alternative approach could be to set things up so the fields are
never longer than 255 characters, and concatenate them in Word by simply
using adjacent mergefields (<<Part1>> <<Part2>> ...)


Hi,

I've got a query which in one field contains a concatnated list of other
values that is generated by a function I wrote. The function works fine,
and I get all the relevant infgo whan I view the query in access.
However, when I try to use the field as a data source for a merge in
Word, everything after cahracter 255 is lost.

Is there any way I can get around this limitation? I'm using Office XP Pro.

Thanks,

Phil Walsh

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Back
Top