Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset a variable when it reaches a certain number

Status
Not open for further replies.

ScottWood

Technical User
May 31, 2001
81
GB
I have created a variable that counts the number of records, but i would like the counter to reset back to 0 when it reaches 5, how would i do this?

Cheers
 
WhilePrintingRecords;
NumberVar YourCounter;

If Counter >= 5
Then Counter := 0
Else
<Your Current Formula Here>

You could also achieve this in a running total, by setting the conditional reset functionality to >= 5.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top