************************ SELECT 1 GO TOP DO WHILE .NOT. EOF() cDupeId=EVALUATE(SYS(14,1)) && Get the Value of index tag number 1 SKIP IF cDupeId=EVALUATE(SYS(14,1)) REPLACE samplenum WITH STR(VAL(samplenum)+1) *BROWSE ENDIF ENDDO *************************To answer the rest of your question, we should know what cDupeID is, is that a field that holds the concatenated field values? If it is how are you changing the value in that field after you increment the SampleNum? Also, STR() by default returns a right justified 10 digit string of numbers with leading spaces. If your field is less than 10 characters wide you may be getting a blank value as the string is truncated to fit. You should use the secon argument of STR() to set the length of the string to match the field width. If the field is 5 use STR(VAL(SampleNum)+1,5).