Hello Mandy,
well, this works, but has nothing to do with multiuser access other than using FLOCK to be sure you can write to the table. It's not necessary to make such a lock to insert data. But you make a typical error, you APPEND BLANK and then use a series of replaces. All this can be done with one INSERT (SQL). Or you insert this into a buffered view and then a TABLEUPDATE() can not only insert a single record but all changes done in a local workarea, which can be deletions, new records and updated/changed data.
As I said there is a whole topic about Programming For Shared Access and the minimum to learn is about MULTLOCKS, buffering and locking, pessimisitic vs optimistic, TABLEUPDATE() and its implications and requirements. It's too much for a single answer or thread or FAQ, it means learning a whole chapter. The least thing you get from it is better understanding errors and what they mean and what reasons they could have. And that's not something anyone can teach you in a simple forum discussion, so take it serious to learn the whole help section about programming for shared access.
Chriss