If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Print the same record twice
I need to print labels for products I ship out. A customer
may order 2 cases of product A and 3 cases of product B. Subsequently I need 2 & 3 labels respectively. I would like to query the order file and create a column called LabelQty that passes a parameter to the report telling it how many of each label to print. I'm fairly sure I can do this with an On Format event in the Detail section, but I just can't figure out the code. Any help or references will be greatly appreciated. |
#2
|
|||
|
|||
Print the same record twice
Bill Phillips wrote:
I need to print labels for products I ship out. A customer may order 2 cases of product A and 3 cases of product B. Subsequently I need 2 & 3 labels respectively. I would like to query the order file and create a column called LabelQty that passes a parameter to the report telling it how many of each label to print. I'm fairly sure I can do this with an On Format event in the Detail section, but I just can't figure out the code. I can think of two ways to approach this issue. The one you asked about is to keep a counter variable in the detail section's Format event procedure and use that to control the report's MoveNext property. I don't feel very comfortable using an event procedure counter. Another way is to create a table named NumCopies with one field named Qty. Populate the records in the table with consecutive numbers from 1 to more than you ever need for duplicate labels. Then add that table to the report's record source query without any join line between the two tables and a criteria that limits the Qty field to the number of cases ordered. E.g. SELECT Orders.*, NumCopies.Qty FROM Orders, NumCopies WHERE Orders.OrderDate Between [Start] And [End] AND NumCopies.Qty = Orders.NumCases This will provide the label report with the appropriate records so that report does not have to be concerned with duplicating anything. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|