Hello Steve
When I ran the program I got a runtime error: File sharing lock count exceeded
Table 2 ended up with 178 records (which I think is correct)
Table 1 records - some have Table 2 reference - some do not
Bob M
Hello Steve
When I ran the program I got a runtime error: File sharing lock count exceeded
Table 2 ended up with 178 records (which I think is correct)
Table 1 records - some have Table 2 reference - some do not
Bob M
Ah... something I may be able to help with....When I ran the program I got a runtime error: File sharing lock count exceeded
I think you mean the max locks per file which is a registry setting - by default it is 9500 but can be increased if that error arises
See this thread for an explanation of how to increase the max locks per file (and some other related issues):
https://www.access-programmers.co.uk...e+sharing+lock
Hello ColinAh... something I may be able to help with....
I think you mean the max locks per file which is a registry setting - by default it is 9500 but can be increased if that error arises
See this thread for an explanation of how to increase the max locks per file (and some other related issues):
https://www.access-programmers.co.uk...e+sharing+lock
tried this -> upped the value to 15000
same error
If bSimilar loop t1.edit is where it falls over
Bob M
If it is a max locks per file issue then note that there may be several registry entries for this. From memory, I had five to update.
I've not heard of any maximum limit and in one google search someone suggested a million.
I've done baby steps preferring to increase as and when needed.
Also did you reboot your computer after making the changes.
It may not take effect till you do so.
I haven't looked at your database though I have been reading the thread.
My earlier comment about Steve deserving a medal was because I couldn't make sense of what you were describing so decided not to get involved.
I was very impressed that Steve did seem to understand it
He certainly deserves lots of rep points
Yes, I had the same error. I thought it was because my confuser had a meltdown and I did a reinstall of Win7 and all programs. I did edit the code - turns out it has something to do with editing the recordset T1 inside the loop.
I change the T1.update/update code to an update query and .... no more file lock errors!
This is my understanding of what you want at this point:
1) Each record in Table1 is compared to every record in Table2.
2) If a record in Table2 is similar to the current record in Table1, update the field "Table2ID_FK" in the current record in Table1 with the PK value of the record that is similar in Table2.
3) If there is NOT a record in Table2 that is similar to the current record in Table1, add the T1 record values to a NEW record in Table2 and update the field "Table2ID_FK" in the current record in Table1 with the PK value of the NEW record in Table2.