Nesting For Loops

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: 11
Joined: Wed Dec 14, 2011 8:48 pm

Nesting For Loops

Post by rlmeyer » Mon Feb 27, 2012 3:27 pm

This is probably a noob question, but I cannot find info that answers the question. Can you nest For Loops in NiceForm? I am trying to use the least amount of VBScript possible.

Here is the senerio...
I have Form that has a start label field and a end label field which gives you the number of labels to print. On the last label I want it to set a field value to "" and print a label. My first for loop prints labels from start field to end field with curr label as loop variable. Within that first for loop is another for loop that has a condition of curr label = end label. If the condition is true then it sets a separate field to "" and prints one label. Everytime I initiate the actions above, it gives me an error (see attachment). I am guessing the problem is nested for loops. All variables are defined and have the correct data type.

Any help would be greatly appreciated.

error_nesting_forloops.jpg (15.77 KiB) Viewed 2072 times

User avatar
NiceLabel Development
NiceLabel Development
Posts: 695
Joined: Tue Sep 12, 2006 12:50 pm
Location: Kranj, Slovenia

Re: Nesting For Loops

Post by dado » Mon Feb 27, 2012 6:29 pm

I would suggest you post your form and label too. This would give us a lot more information to check what's happening here.



Post Reply