Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2004

Tip: Looking for answers? Try searching our database.

Mailmerge from multiple tables in database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
help - 25 Feb 2004 16:21 GMT
I have an address database, but in that database there are 3 tables that have address information. Each table has a different set of addresses, such as 1 table is project addresses, another table is architect addresses. In word I need to use mail merge but be able to pull the information from all three of these tables. Is there a way that I could do that? I'm trying to make a template so that the users can just hit the ABC button and the information from all three tables is already in there. Is this possible?
Peter Jamieson - 25 Feb 2004 17:10 GMT
You probably need to write a query in Access that pulls all the data
together in the format you need. If each table has the same data structure,
a UNION query such as the following might be enough:

SELECT * FROM TABLE_A
UNION
SELECT * FROM TABLE_B
UNION
SELECT * FROM TABLE_C

However, if you are using WOrd 2002/2003 you will probably find that the
default connection method (OLEDB) does not "see" UNION queries and you will
either have to wrap the query up in yet another query, or use a different
connection method (check Tools|Options|General|"Confirm conversion at open"
then go through the data source setup).

If you are not in a position to modify the Access database or have it
modified, you could consider
a. creating a new Access database and putting the query in there. It can be
done, but Word may have difficulty using that as a data source. Or
b. using VBA and the OpenDataSource method to issue the query directly.

Ask again if you need further info. on those approaches.
--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> I have an address database, but in that database there are 3 tables that have address information. Each table has a different set of addresses, such
as 1 table is project addresses, another table is architect addresses. In
word I need to use mail merge but be able to pull the information from all
three of these tables. Is there a way that I could do that? I'm trying to
make a template so that the users can just hit the ABC button and the
information from all three tables is already in there. Is this possible?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.