Rex -
To simplify my original message, the record locking feature of this procedure was left out. (It would be included in the "etc." part of the code displayed below. The DO WHILE ! llSuccess line starts that feature. It's not exactly a record lock, but it will keep the table in the view from distributing more than one unique value for a given table.
Thanks though!
>PMFJI, but the NewId table needs to be a table so you can lock the record until the value is iterated. If it were a view, two users could get the same value for the key but only one could update the underlying table correctly.
>
>HTH
>
>Rex
>
>>* Excerpt from function NewID()
>>*=================================
>>IF ! USED("rv_nextkey")
>> USE "eis!rv_nextkey" IN 0
>>ELSE
>> REQUERY("rv_nextkey")
>>ENDIF
>>
>>IF _TALLY = 1
>> MESSAGEBOX("_Tally was successfull")
>> SELECT rv_nextkey
>> llSuccess = .F.
>> DO WHILE ! llSuccess
>> lnRetVal = rv_nextkey.nextkey
>> REPLACE rv_nextkey.nextkey WITH rv_nextkey.nextkey + 1
>>*etc..
>>*=================================
>>