go bottom mNumberOfRecords = recno() do while mLineCount <= mNumberOfRecords mTestID = val(alltrim((dtos(date()))+alltrim(str(1000*seconds()))))+mTestID update labtests set labtests.testid = mTestID mTestID = mTestID+1 mLineCount = mLineCount + 1 enddoProblem: This code inserts the numbers, but they are all the same fo all the records. I would like for it to generate a unique number for each record.