Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail Merge Directory Records couldn't repeat header?

Status
Not open for further replies.

audface

Programmer
Sep 27, 2002
14
MY
Hello All,

This is the first time I have had a request to create a directory mail merge. I had created a mail merge document having list of invoices records according to customers. However, I will need the Customer Name to be repeated if list of invoices are to overflow to the second page or more. Currently, I can only have the customer name on the very first page of mail merge template. I'd tried to use template header for Customer Name but couldn't achieve what I need. Below the example:

Customer : A

Invoice 1
.
.
----------<Pg Break>------------
.
.
Invoice 25


I will need to display as follows:


Customer : A

Invoice 1
.
.
Invoice 20
----------<Pg Break>------------

Customer : A

Invoice 21
.
.
Invoice 25

I will really appreciate any advise or guide. Thank you in advance. :)
 



Hi,


I would recommend using Excel to accomplish this task.

Mail Merge in Excel faq68-4223

You will have a simple For...Next loop that will write each customer name to a specific cell.

That cell will be the link for a Parameter Query that will return the Invoices for the given customer.

The Query can be inserted via Data/get External Data/New Database query... Excel Files - select YOUR WORKBOOK and the WORKSHEET that contains the Customers and Invoice table.

In the QBE grid, in the CRITERIA for Customer, enter [What Customer?] rather than a name. File/Return Data to Excel and in the PARAMETER window, select the CELL that will contain the Customer.

Post back if you need help.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top