You have to FLOCK() table in order to prevent duplicates. I would recomend to abandon it altogether and use method recomended by Craig Berntson in
http://www.craigberntson.com/Articles/kb006.htm>In the field validation of the table the default value function is the following:
>
>
>
>ALLTRIM(STR(RECCOUNT()))
>
>
>
>Is there any way two users could get the same value from this for their record?
>What if these two users run code to add a record at the same time?
>
>User1:
> SELECT Table_with_default_value_for_primary_field && has 99 records
> APPEND BLANK && 100th record.
>
>User2:
> SELECT Table_with_default_value_for_primary_field && has 99 or 100 records?
> APPEND BLANK && 100th or 101st record?
--sb--