Hello,
The second function called by my main sub contains the following line:
If I have changed a piece of code before running it, it raises an error:
"The database has been placed in a state by user 'Admin' on machine 'numbers' that prevents it from being opened or locked."
If I haven't, the code works, but prevents me from doing any changes until I close and reopen it, making working on it a real pain.
Additional info:
- I'm using access 2010
- the database in on the network, but in my own folder and I'm the only one to have ever touched it.
- the database is split, in the sense that all the data is in tables by year, linked from their own .accdb file (they are so big I have one per year), and all the queries and forms are in this one.
- the first function called opens the year's database:
which never makes it crash in any way.
- since I've been having this issue, I have some very strange trouble later on with using Collection objects, such as having them as "Nothing" even though the Dim statement in the same function includes "As New Collection" (the collections are not globally defined), and also strange complete crashes of Access (ie, getting a data type conversion error, clicking debug, and the whole thing just crashes instantly and closes)
The code I've been working on is quite big and convulted, but solid. I've tried compacting, of course, copy-pasting the base, copy-pasting the form (seemed to work a few times but no longer), copy-pasting the code, not to avail.
What am I missing? Why do using currentDb necessitate exclusive access to the database, and how can I avoid it?
I'm 100% sure that currentDb doesn't do that in my other applications.
Thank you
The second function called by my main sub contains the following line:
Code:
Set rs = CurrentDb.OpenRecordset("Parametres")
If I have changed a piece of code before running it, it raises an error:
"The database has been placed in a state by user 'Admin' on machine 'numbers' that prevents it from being opened or locked."
If I haven't, the code works, but prevents me from doing any changes until I close and reopen it, making working on it a real pain.
Additional info:
- I'm using access 2010
- the database in on the network, but in my own folder and I'm the only one to have ever touched it.
- the database is split, in the sense that all the data is in tables by year, linked from their own .accdb file (they are so big I have one per year), and all the queries and forms are in this one.
- the first function called opens the year's database:
Code:
Set yearDB = DAO.OpenDatabase(path)
- since I've been having this issue, I have some very strange trouble later on with using Collection objects, such as having them as "Nothing" even though the Dim statement in the same function includes "As New Collection" (the collections are not globally defined), and also strange complete crashes of Access (ie, getting a data type conversion error, clicking debug, and the whole thing just crashes instantly and closes)
The code I've been working on is quite big and convulted, but solid. I've tried compacting, of course, copy-pasting the base, copy-pasting the form (seemed to work a few times but no longer), copy-pasting the code, not to avail.
What am I missing? Why do using currentDb necessitate exclusive access to the database, and how can I avoid it?
I'm 100% sure that currentDb doesn't do that in my other applications.
Thank you