Query Results into report with multiple copies

PMF1957

Registered User.
Local time
Yesterday, 19:13
Joined
Dec 21, 2012
Messages
23
I'm Back....Sorry about this gang but I'm having trouble finding a solution for another report issue.
I'm running Access 2010 and I have a query that extracts a range of Workorders that I can currently print out a single copy. What I need to be able to do is to print three copies of the report for each record that the query finds.
Example: Starting WorkOrder number: 93565
Ending WorkOrder number: 93567
Results in data extract is:
qselWorkOrdersbyWorkOrderNumberRangeWO#Store NumberDue DateStatusP.O. NumberAccount NumberRequested ByProcess DateQuantityCatalog NumberCommentsDescription935653502/18/2014
99999
Maintenance

WN086
MIRROR PLEXI935668132/18/2014In Process99999
Maintenance

SB
Saniboard935672302/18/2014In Process99999
Maintenance

SB
Saniboard

I need to print three copies of each WorkOrder: IE

93565 - Copy1
Copy2
Copy3
93566 - Copy1
Copy2
Copy3
93567 - Copy1
Copy2
Copy3
The copies for each WorkOrder must be kept together to eliminate any manual colatting and each must have a different footer.

Any help will be greatly accepted!
Thanks in advance!
 
You could change the footer with VBA, printing 1 page - change the footer - print the next page etc.

The simplest solution i can figure would be 3 versions of the report, called to print in order.
 
Thanks for responding. I can get the three copies by executing the following:
From the on Click from the main page:

DoCmd.OpenReport stDocName, acViewNormal, "Bulk Work Orders Filter", , , "Copy1"
DoCmd.OpenReport stDocName, acViewNormal, "Bulk Work Orders Filter", , , "Copy2"
DoCmd.OpenReport stDocName, acViewNormal, "Bulk Work Orders Filter", , , "Copy3"

Then in the footer properties on print i call the Openagrs from above.

This works except it requires me to enter the selection for the start and end WorkOrder number 3 times. How can I avoid having to enter the information three times?
 
Ah, do you mean you are prompted to enter the start and end WorkOrder numbers 3 times - your query is a parameter query?

If this is the case, the answer is to have a simple pop up form where you can select (or type) the start and end WorkOrder numbers, with a print button to call the print routine you already have EXCEPT the query parameters now reference the form controls. Because the form will be open during printing the start and end WorkOrder numbers will always be available.

An alternative (that has just crossed my mind - I think it would work) would be 2 global variables WorkOrderStart and WorkOrderEnd that you assign the values to via Inputboxes and two functions that simply return their values
Code:
Public Function WOstart() as Long
WOstart = WorkOrderStart
End Function
You would then use these functions in place of the parameter values in the query
 
Last edited:
Thank you sir. I created the form and it worked great, It did not request the starting and ending numbers several times, thank you. However (isn't there always an "however"). The printed reports do not print the way I need them to.
They are printing in the following manner:
Workorder#1 - Copy1
Workorder#2 - Copy1
Workorder#1 - Copy2
Workorder#2 - Copy2
Workorder#1 - Copy3
Workorder#2 - Copy3
I need them to print as follows:
Workorder#1 - Copy1
Workorder#1 - Copy2
Workorder#1 - Copy3

Workorder#2 - Copy1
Workorder#2 - Copy2
Workorder#2 - Copy3

I tried sorting and grouping in the report but that did not work....

Please advise....
 

Users who are viewing this thread

Back
Top Bottom