* FUNCTION IncrChar * AUTHOR: George Tasker * DATE: January 8, 1999 - 1:26 PM * PURPOSE: LPARAMETER pcChars LOCAL lcresult, lcrightmost, lcbase, lnlength lnlength = LEN(pcChars) lcrightmost = CHR(ASC(RIGHT(pcChars, 1)) + 1) IF lnlength > 1 lcbase = LEFT(pcChars, LEN(pcChars) - 1) IF lcrightmost > "Z" lcresult = IncrChar(lcbase) + "A" ELSE lcresult = lcbase + lcrightmost ENDIF ELSE IF lcrightmost > "Z" lcresult = "AA" ELSE lcresult = lcrightmost ENDIF ENDIF RETURN lcresultNo loops, no muss, no fuss. It'll automatically icrease the length by one when it gets to "ZZZZ" or the like.