Hi
I have a database in which Users keep getting a runtime error stating that records can't be updated because they are locked by another user on the network. Their copy of the FE then freezes. The only way to resolve the issue is to ask the person using the reported PC to log out of their PC or by restarting the server
Default record locking is set to Edited Record in the Database options and also on each form.
The error only seems to happen when somebody tries to create a new record in a particular table when somebody else is also creating a new record in the same table. The way the system was working was that a user would click an 'add record' button and the code behind the button included, amongst other things, DoCmd.GoToRecord , , acNewRec. I thought this was the reason for the conflict as it can take quite a while to add the required information for the new record and it appeared the system was locking everybody else out whilst that new record was in progress.
My 'solution' was to use a separate form with unbound controls for people to create a new record. When completed, the 'save' button on the form runs a procedure (created for me by somebody on another forum) using a DAO recordset which appends the data on the form to the relevant table. This worked for a short time but then the users started to get the same locking message.
.The database is properly split with the backend on a shared network drive and a copy of the same front end file on each User's Desktop. Each time they log in a fresh copy of the front end file is copied to their Desktop.
When the database opens the default form is a login form which checks their password and then opens a main menu form if correct. The login form is then hidden and remains open. All users have read/write/modify/delete permissions on the folder containing the back end data file
One thing I've noticed is that the locking laccdb file does not get deleted when the last person closes this database and wondered if that file or the database is corrupted in some way. I've done a compact/repair on both the FE and BE, and I've imported all of the objects into new FE and BE database files but neither has helped.
The users are getting increasingly frustrated as it's happening multiple times each day. The database has no errors in it as far as I can establish, it works perfectly locally. The code all compiles OK.
Can anybody suggest what might be causing these errors and/or how I can stop them?
Thanks
Norman
I have a database in which Users keep getting a runtime error stating that records can't be updated because they are locked by another user on the network. Their copy of the FE then freezes. The only way to resolve the issue is to ask the person using the reported PC to log out of their PC or by restarting the server
Default record locking is set to Edited Record in the Database options and also on each form.
The error only seems to happen when somebody tries to create a new record in a particular table when somebody else is also creating a new record in the same table. The way the system was working was that a user would click an 'add record' button and the code behind the button included, amongst other things, DoCmd.GoToRecord , , acNewRec. I thought this was the reason for the conflict as it can take quite a while to add the required information for the new record and it appeared the system was locking everybody else out whilst that new record was in progress.
My 'solution' was to use a separate form with unbound controls for people to create a new record. When completed, the 'save' button on the form runs a procedure (created for me by somebody on another forum) using a DAO recordset which appends the data on the form to the relevant table. This worked for a short time but then the users started to get the same locking message.
.The database is properly split with the backend on a shared network drive and a copy of the same front end file on each User's Desktop. Each time they log in a fresh copy of the front end file is copied to their Desktop.
When the database opens the default form is a login form which checks their password and then opens a main menu form if correct. The login form is then hidden and remains open. All users have read/write/modify/delete permissions on the folder containing the back end data file
One thing I've noticed is that the locking laccdb file does not get deleted when the last person closes this database and wondered if that file or the database is corrupted in some way. I've done a compact/repair on both the FE and BE, and I've imported all of the objects into new FE and BE database files but neither has helped.
The users are getting increasingly frustrated as it's happening multiple times each day. The database has no errors in it as far as I can establish, it works perfectly locally. The code all compiles OK.
Can anybody suggest what might be causing these errors and/or how I can stop them?
Thanks
Norman