I use unbound forms and VBA to control the data entry and editing on forms. I do this to provide more control to the program to perform validation checking and avoid the problems with the bounds fields being immediately updated.
I would like to be able to lock a record on a table whilst the user is editing it but can't work out how to do this. I usually create a recordset of all the reocrds in a table then use the FINDFIRST method to get to the record I want. Then issue the edit and update when the user clicks the save button.
However this is not good for multi user systems because two people can edit the same record and overwrite the others details. Is it possible to assign a lock on a TABLE record after the edit property is set for the recordset?
eg.
with rstRecordset
.Edit
' code here to lock table record
end with
Conversly when the data has been updated similar code would need to take the lock off the table.
This may require me to change the way I write systems but it would be nice to know if it is possible.
I would like to be able to lock a record on a table whilst the user is editing it but can't work out how to do this. I usually create a recordset of all the reocrds in a table then use the FINDFIRST method to get to the record I want. Then issue the edit and update when the user clicks the save button.
However this is not good for multi user systems because two people can edit the same record and overwrite the others details. Is it possible to assign a lock on a TABLE record after the edit property is set for the recordset?
eg.
with rstRecordset
.Edit
' code here to lock table record
end with
Conversly when the data has been updated similar code would need to take the lock off the table.
This may require me to change the way I write systems but it would be nice to know if it is possible.