Word Merge with Group By

G

Guest

I have a query with a list of doctors and patients.

I would like to be able to print a letter (using a mail merge) to each doctor listing out the current patients. I'm using MS Access 2000 and Word 2000.

Any suggestions?
 
G

Guest

I'm not having a problem with merging. I can't get it to group the records so it prints one letter per doctor and lists out the patients on the page...
 
J

John Nurick

Hi James,

The simplest way to do this is to revise your query so it returns one
record per doctor, with the patient information concatenated into a
single field (with a paragraph mark between each patient and a tab
between each item of information on the patient).

The fConcat() function at http://www.mvps.org/access/modules/mdl0008.htm
can help do this. You'll need to replace the "; " separator it uses with
vbCR or vbCRLF.

(If you want the patient information to go in a table in the Word
document, create one field in your query for each column in the table,
and use fConcat() on individual fields).

For more flexibility it's necessary to use write VBA code that controls
the creation of a Word document and puts the data exactly where it's
needed.

The other approach is to do it all with an Access report. You lose
Word's finer typographic control but sorting, grouping and sub-reports
are easy.
 

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