Ahhh, now I understand. D'oh! :D
Note the missing semi-colon on one of the last lines there...
In reply to Re^8: loop problem by stevieb in thread loop problem by WisDomSeeKer34