>Hi Jess,
> Thank U very much, your solution works. By the way, when I try to key in the deleted record again, the message of 'Uniqueness of Index CODE is violated'. I know that, this is due to the unique index in the table and the deleted record still in the table. What is the best way to make sure the user can key in the deleted record again. I way that I can think of is to pack the table every time we delete the record, will pack process slow down the performance when the table size get big?
>
>Thank U.
Two ways:
1. SET DELETED OFF
Seek the inputted key
If found
RECALL
ELSE
REPLACE key to new record
ENDIF
SET DELETE ON
2. If key is numeric, multiply it first by -1 before deleting to make it unique (good for one deletion only.)
If key is character, replace it with SYS(2015) before deleting.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."