Thanks Cosmin & Grant. Both your solutions didn't work. Cosmin, the number incremented was the wrong one. I needed the last three characters to be incremented in AB-CDE-FG1-004, your's incremented the integer in FG. That is, FG1 became FG2.
However your function was put to use, so thank you. What I did was extracted the last three characters in the string and passed it to your function. This then correctly returned the result of AB-CDE-FG1-005. Mike _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

