Solved Access Update Causing File Locking Bug?

maxwhipw

New member
Local time
Yesterday, 22:26
Joined
Sep 12, 2024
Messages
13
Hi hope this finds you well,

I recently had an issue that was resolved in this last thread where there was an issue trying add a record using one form and then immediately open it up in another form.


Now suddenly, after working on a separate form in the program the form that was fixed randomly seems to have broken.
I think this problem began to occur after the program crashed and I lost many hours of vba code, but none in the form that this problem seems to be associated with.

When I add a new record and open the form immediately to the newly created record, the form fails to load any of the controls in the details section and remains blank until manually refreshing 5 seconds later.

This happens on older versions of the file that were working previously too.

It randomly spawns message boxes when I try to save a record in the form
Microsoft Access can't save design changes or save to a new database object because another user has the file open. To save your design changes or to save to a new object, you must have exclusive access to the file.

And it says when attempting to edit VBA code
You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later.

The database is currently in my documents folder and has a split backend. No one else is using it.
I also have record locks disabled on the forms.
I think I have record locking disabled in Client Settings and have Shared mode toggled.

Oddly enough, at the same time the Edge Browser Control I had in the form, and was using to display pdfs, broke and no longer renders anything but a white box when I change its recordsource. Not sure what's going on.

Any ideas on how to fix it?

Thank you,

Max

*Edited for clarity*
 
Last edited:
Update: I am pretty sure my Access updated recently as it gave me a notification about Inserting a new modern chart. Would also explain while the locking and the edge browser both seemed to break at the same time.

Anyone else having issues or did an update not happen?
 
Update: I am pretty sure my Access updated recently as it gave me a notification about Inserting a new modern chart. Would also explain while the locking and the edge browser both seemed to break at the same time.

Anyone else having issues or did an update not happen?
What does the breaking of the edge browser look like? What does it mean to say, "...the locking ... seemed to break"?
 
What does the breaking of the edge browser look like? What does it mean to say, "...the locking ... seemed to break"?
For the locking after creating a new record and opening it in a separate form I can no longer edit the form in design mode or the VBA modules and it gives the messages above.

The edge browser just remains white when the recordsource is changed. In the past it rendered although often it had to be in full screen to render or would stay completely blank, not rendering.
 
Last edited:
It started working again. Not sure why. I went and started fixing up some of the ways I opened recordsets and stopped using CurrentDb.OpenRecordset("exRecordset") and used db and rst, rst.Close and set both to nothing. It didn't immediately fix it but after disabling and reenabling parts of my code it seems to work now oddly enough.
 
After the fact and considering your description, it sounds like you got caught on a sloppy object closure. There are circumstances in which you can open a recordset and have it stay open until Access itself closes. That is one of the reasons why I suggest that, when in doubt, ALWAYS close what you open. In theory there are times when you shouldn't have to do so, but if the recordset object is Public and in a general module, it lives on a lot longer than you might imagine. Other types of objects can have this same effect. Outlook, Excel, and Word are particularly sensitive to that problem.
 
After the fact and considering your description, it sounds like you got caught on a sloppy object closure. There are circumstances in which you can open a recordset and have it stay open until Access itself closes. That is one of the reasons why I suggest that, when in doubt, ALWAYS close what you open. In theory there are times when you shouldn't have to do so, but if the recordset object is Public and in a general module, it lives on a lot longer than you might imagine. Other types of objects can have this same effect. Outlook, Excel, and Word are particularly sensitive to that problem.
Thanks! I will assume that was it, something weird happening in memory and not getting cleaned out
 

Users who are viewing this thread

Back
Top Bottom