Counting record copies

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Posts: 2
Joined: Sat Sep 07, 2019 11:41 am

Counting record copies

Post by Reyu » Sun Sep 22, 2019 9:50 pm

I am using NiceLabel Designer PowerForms 19.1.

I created a printing solution with a “Data initialization” object on it where I can choose the printable labels with the “PrintingForm_LabelName” variable.
In an Access file, I have several running serial numbers. I am pulling in the serial numbers, formatting them to the proper format with VBScript, and assigning them to a Counter.
For testing if I use the “PrintingForm_Quantity” variable (or a predefined value with a variable in vbscript) to update my Access file, the serial number is updating from Access into a temp vairable, this variable is updating after I increasing it with the “PrintingForm_Quantity”, and its writing back to the Access file with the correct format and value.
For testing “PrintingForm_Quantity” was good, but I want to change it to another variable.

I am doing all of this with the Print button events.

Is there any way to store only the selected record’s “Copies” (in the “Data initialization” panel) in a separate variable, so I can update my Access with this number instead of “PrintingForm_Quantity”?
Is there a way to loop through every record, check if it is checked and count the number of copies with VBscript? Or is there any other solution?

I played around with the internal variables but i cant get back a proper value.
If the print preview is updating, isn't there a way to grab the correct numbers to a variable?

I do want to achieve the following:
If the user clicking on the Print button before printing do the following steps:
- Update and pull in the serial number from the attached Access file
- Format these numbers
- Assign these numbers to objects in the label
- Every label has its attached excel table, loop through on the selected records and count their
copies (optionally update the “PrintingForm_Quantity” variable with this number)
- Add this number to the updated serial number and write the new number back to the Access file
-Print labels

So I just want to count every copies from the “Data initialization” panel if they are checked, and update my Acces file with this new number.

I hope someone can help me with this.

NLabel help.png
NLabel help.png (211.13 KiB) Viewed 986 times

User avatar
NiceLabel Support
NiceLabel Support
Posts: 122
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin

Re: Counting record copies

Post by Mytch » Tue Oct 08, 2019 3:17 pm


Sorry that you have not gotten a reply on this yet. I think it is because it's currently not really possible to accomplish what you are asking for. Perhaps you can post an idea with your particular use-case to our Suggestion Box:

However, there may be alternative methods to capture your total copies printed. Such as adding a capturing a counter value, use an Internal Variable, etc. to grab the largest value from the print job.


Post Reply