Package n of nth on report

sargentrs

Registered User.
Local time
Today, 17:58
Joined
Aug 26, 2008
Messages
19
I've created a database to print "package labels" based on a input form for sales orders. The operator decides which sales order line to print labels for then clicks the "Labels" button. A dialog box prompts them for number of packages. They input the quantity, i.e. 5 packages. I want the labels to have fields on it that say:

Pkg 1 of 5, 2 of 5, 3 of 5, etc. with 5 of 5 being the last one. All other fields are identical to the 1st one.

They are printing 5 copies of the same report, not 1 copy of a 5 page report.

I'm new with code so I'm struggling. Please forgive my ignorance. We're using Access2000, 2003 and 2007 on multiple work stations. I could do it with SetValue in a print macro but SetValue is no longer in Access2007 and SetTempVars are not in Access2000.

Any help or pointers will be greatly appreciated! Thanks!
 
SetValue is still in Access 2007; you have to click on the Show All Actions button on the ribbon.
 
Duh! Another one of those little quirks, huh? I'll tackle it from a macro standpoint. I can design those fairly well. Thanks!
 
Here's what I wound up doing:

Make Excel spreadsheet from text file generated from Manufacturing System.
Store on local drive. Serves multiple databases and work stations.
Make table in FE database from spreadsheet.
Make new BE database and store on network server.
Built form to display open sales orders (frmOpenSalesOrders) and add command button called "Labels".
Built form (frmShipmentLabels) to display selection and added unbound text box to enter number of packages (NumPkgs). Added invisible text box for counter (counter).
Added command button to "Print Labels".
Print labels button calls macro to initialize [counter] to 1 and run another macro to print labels.

mroInitializeCounter
SetValue [Forms]![frmShipmentLabels]![counter], 1
RunMacro mroPrintShipmentLabels
Repeat Expression
[Forms]![frmShipmentLabels]!counter]<=[Forms]!
[frmShipmentLabels]![NumPkgs]

mroPrintShipmentLabels
OpenReport rptShipmentLabel, Print, , ,
SetValue [Forms]![frmShipmentLabels]![counter],
[Forms]![frmShipmentLabels]![counter]+1

So when the operator inputs 5 packages, the labels print out with the sales order data and....Pkg: [counter] of [NumPkgs] until [counter] > [NumPkgs] then stops and returns control back to the operator.

Anybody see a way to make it more efficient? How about Vb coding?
Any help would be greatly appreciated! Thanks.
 

Users who are viewing this thread

Back
Top Bottom