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 / June 2006

Tip: Looking for answers? Try searching our database.

Filtering from Access Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
novice - 09 Jun 2006 05:27 GMT
I am trying to merge some addresses from Access Database. I am trying to
filter the addresses during merge using the arrow next to Zip column.
However, it keeps on merging all the data in the file irrespective of the
filter condition. When I go back to the query I had build using the
'advanced' filter I find it has added a number of query clauses by itself.
How do I make it work.

The access database is sorted by Zip.
Peter Jamieson - 10 Jun 2006 09:27 GMT
There are definitely problems with Word's filtering for some types of data
source. After you have entered your filter (and sort) criteria, Word
converts the criteria into an SQL statement that it uses to get the filtered
data from the data source. Unfortunately,
a. sometimes the filter criteria are wrongly replicated
b. sometimes Word generates SQL that the data source does not understand.

It may be that changing the connection method to DDE (check Word
Tools|Options|General|Confirm conversions at open, reconnect to the data
source, and choose DDE when offered) is enough to fix this. If not, I do not
think there is anything you can do about this without "programming" in
either Access or Word.

If you are doing these merges yourself and know how to use SQL and Word VBA,
the simplest approach is probably to create a small VBA module that calls
OpenDataSource with all the right details including a valid SQL statement
(or sets ActiveDocument.MailMerge.DataSource.QueryString), then modify the
SQL and run the module before each merge. otherwise, you might be able to
moduify the query in Access each time.You might also be able to create a
parameter query in Access and use that. However, if you do, you need to
connect using DDE as described above. Also, the dialog boxes that prompt for
the parameters sometimes appear behind the Word window, which sometimes
makes it look as if Word has hung, when what you actually need to do is
Alt-tab to the dialog box.

Peter Jamieson

>I am trying to merge some addresses from Access Database. I am trying to
> filter the addresses during merge using the arrow next to Zip column.
[quoted text clipped - 4 lines]
>
> The access database is sorted by Zip.
 
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.