Multiple Data Sources on a single form

D

dsquared

Please forgive me, but I'm new to using Mail Merge.
I was wondering if it is possible to use more than one data source in
a single document. For instance an envelope. I want to pull the
information for the recipients from one sql server table, and the
return address from another table in the same database.

Any help in pointing me in the right direction would be greatly
appreciated.
 
P

Peter Jamieson

A mailmerge can only have one data source in the sense that it is usually
understood within Word Mailmerge.

However,
a. that data source can be a view, which uses a join to bring together
related data from multiple tables and views. as long as there is something
to link each recipient with the appropriate return address you should be
able to combine the two sets of information in a view
b. if you aren't allowed to create a view in your database, you can issue
the equivalent SELECT statement from Word VBA. However, your query is
limited to around 255 or 511 characters, and that can be a significant
limitation
c. you can sometimes insert pieces of information that come from other
sources of data using DATABASE fields. However, before going down that route
you should really try out (a). If you're not familiar with SQL and views,
tell us a little bit about the structure of the tables you need to get the
data from and maybe we'll be able to make some suggestions, or you could try
asking in a more SQL-related group.

Peter Jamieson
 
D

dsquared

A mailmerge can only have one data source in the sense that it is usually
understood within Word Mailmerge.

However,
a. that data source can be a view, which uses a join to bring together
related data from multiple tables and views. as long as there is something
to link each recipient with the appropriate return address you should be
able to combine the two sets of information in a view
b. if you aren't allowed to create a view in your database, you can issue
the equivalent SELECT statement from Word VBA. However, your query is
limited to around 255 or 511 characters, and that can be a significant
limitation
c. you can sometimes insert pieces of information that come from other
sources of data using DATABASE fields. However, before going down that route
you should really try out (a). If you're not familiar with SQL and views,
tell us a little bit about the structure of the tables you need to get the
data from and maybe we'll be able to make some suggestions, or you could try
asking in a more SQL-related group.

Peter Jamieson







- Show quoted text -

Thanks so much Peter. Creating a view worked great.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top