Counting record copies
Posted: Sun Sep 22, 2019 9:50 pm
Hello,
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.
Regards,
Reyu
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.
Regards,
Reyu