One to many Mail Merge

steve21nj

Registered User.
Local time
Today, 16:34
Joined
Sep 11, 2012
Messages
260
Hello All,

I was wondering if anyone had a simple working mail merge application with a one to many field filling into the word document. I have no problem with a one to one, but if the subform has 2 or more associated records related to the main form, I cannot pass all the fields. I was wondering if anyone built a recordset loop or concatenated script so I can learn from it and add it to an existing project.

Example:
main form: CustomerID, Customer, Address
subform: ProductID, Product, Cost, fk_CustomerID


Sample data:
main form: 1, James Smith, 118 Clover Lane
subform entry 1: 4, Small Shipping Boxes, 2.00, 1
subform entry 2: 5, packing tape, 1.75, 1
subform entry 3: 3, Large Shipping Boxes, 3.00, 1
 
Have you tried creating a select query to produce a single list of customer and product? You could put a criteria in to only return the customer displayed on your form and use the query as the mail merge data source.
 
I have tried the select query. When I merge the query source to the word document, it will only display the one product, the first set of values and ignores the others.
 

Users who are viewing this thread

Back
Top Bottom