Hi Terry
>OK. First of all, if more than one user is likely to edit the record then you could get contention. You should use record locking such as:
>
>
>select showdate
>locate
>If RLOCK()
> replace dt1 with datetime()
> = TABLEUPDATE(.T.)
>EndIf
>locate
>
>
Respectfully, sir, I believe you're mixing pessimistic and optimistic approaches. You've taken the pessimistic approach and locked the record while using optimistic buffering.
I also believe row buffering is seldom required. Table buffering is all I've ever needed.
replace dt1 with datetime() record 1 in showdate
IF NOT TABLEUPDATE(.T.,"showdate")
aerror(laError)
MESSAGEBOX(laError[1,2])
ENDIF
This way the last user to save is warned of conflicts. The optimist thinks they'll never get that warning. ;)
A refresh of the form will show the current data and the current user can decide what to do with the current record.