I am using the following piece of code:
************************
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
*************************
The "samplenum" field is character type. However, when a duplicate on the index is found, it just blanks out the field. It doesn't replace it with the incremented value as I want it to.
For the most part the index tag #1 is made of up of a date+tank+apparatus+samplenum. And the data always starts with the samplenum equal to 1 in every case. When the complete index tag number 1 evaluates to a duplicate, I want it to increment the samplenum by one so it will no longer be a duplicate.
Thanks
Elgin Rogers Jr