preventing duplicates

H

Hell-fire

Hi,

I just recently found out about the Mail Merge function. I'm pulling data
from and Access DB query and want to know if there is a way to prevent
duplicate data from showing up.

I have about 15 fields of data that is in the query. Two fields do the
sorting and one of the two fields is an ID. What I like to have merged into
my word template is just one of the ID's, not any duplicates.

For example I get the following:

Report Order: 2 Classification: H-H-L
ID number: 10070
Date opened: 2007/7/31

Report Order: 2 Classification: H-H-L
ID number: 10070
Date opened: 2007/7/30

Report Order: 3 Classification: H-H-L
ID number: 10056
Date opened: 2007/6/31

Report Order: 2 Classification: H-H-L
ID number: 10057
Date opened: 2007/7/07

I get a duplicat ID number which I don't really need. I just need the first
ID number data to show up. Is there any possible way to automatically
prevent duplicates from showing up besides setting the numbers in the Query
Options? Thank you
 
H

Hell-fire

Hi Peter,

The reason I am using mail merge is that I can basically import it directly
into a word doc template that has my table and other things all setup. If I
did it from an Access Report, I can only export it to work as an RTF and
would have to manually copy and paste everything into my table.

The mail merge puts everything in its proper place in my table, which has 15
fields in the table. Thank you for the response though.
 
H

Herb Tyson [MVP]

If you're using Word 2007, in the Mailings ribbon, click Edit Recipient
List. Under Refine recipient list, click Find duplicates. This might be
about the best you can do if you're using Word.

But... Word -- not just Word 2007 -- can work directly from an Access file
as your mail merge data file. I'm not quite sure why you couldn't extract a
duplicate-free data set from the main Access file (i.e., rather than using
an Access report), and use it as your input file instead of using the larger
Access file. Surely, doing this up front in Access would be much more
efficient than trying to cull out duplicates in Word.
 
P

Peter Jamieson

Yes, if you're not doing the kind of merge specified in the article I
mentioned, create a query in Access that eliminates duplicates (in the
generated SQL, use SELECT DISTINCT) and use that as the data source for your
merge.
 

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