>Hi all, I've got a strange problem here.
>
>When 2 users running the same form do data entry together over a network, somehow they will overwrite a record of each other. The field of the primary key is not changed, but all other fields are over written.
>
>All tables are already set to table buffering.
>Running on NT Server 4.0 SP5.
>No problem if only 1 user data entry.
>
>Thanks
Do you mean when they Edit the record? Look at TableUpdate(). If the second parameter is .T., it will overwrite the record without warning. Change this parameter to .F., TableUpdate() will then return .F., indicating that it can't update the record because someone else changed it since it was buffered. You can then use CURVAL() and OLDVAL(), the current value (just the value of the field, and GETFLDSTATE() to determine what has changed.
If your problem comes when two people append a new record, you have a bug in your primary key generation.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer