Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
novice
 
Posts: n/a
Default Filtering from Access Database

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.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Filtering from Access Database

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


"novice" wrote in message
...
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.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge picture from an Access Database Rick Microsoft Word Help 1 April 4th 06 05:48 AM
Merging from secured Access database Dean Mailmerge 1 December 4th 05 11:54 AM
Trying to establish a dde link with an access database Dixie Mailmerge 0 November 9th 05 02:00 AM
How to insert only selected fields from Access database in Word? RenèJ Microsoft Word Help 1 May 23rd 05 09:10 PM
Mailmerge data source in an Access database will not open Colin C Mailmerge 3 December 31st 04 12:01 AM


All times are GMT +1. The time now is 03:34 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"