Well some reference to some other Access database is NOT being added or changed out of the blue here.
You ALREADY have a reference to that registered .dll in BOTH applications. If you re-reigsiter the .dll, and regiser under the same name, then both applcations will still go look for that regisered dll by the name you gave it and thus both will change.
I mean, fire up a access database WITHOUT a reference to the regisered .dll, and THEN see what happens?
Answer: nothing at all!!!!
So, access does on startup try to load nd find the regisered .dll. In fact, you see this if you have say a reference to Excel 14. Now run the same applcation on a computer with Excel 15 or 16 - guess, what, the reference changes!!!!
so you have not shared your regsvr32 command you are using, but they have both a .dll, and the name that will appear when you use VBA->tools->references and set a reference to that .dll. If you THEN re-register the .dll, but the text for the reference in VBA stays the same, then access will flip and use the new registered .dll. Unless you give a 100% different name for the text part, then re-registering the .dll means that access on startup is able to see and find the text part name used, and thus will flip and now point to the new .dll.
And bonus question:
Do and can and do you have BOTH .dlls regiserted at the same time and on the same computer? Since if you do, then they will have not only a different path to the .dll, but ALSO a different name and text that displays, right?
So, if both .dlls are regisered on the computer at the same time, then they have different names, and thus this flip will not occur then, will it?
But, you not AT ANY POINT in time demonstrating that some accDB file by magic get, or has or sees some new reference set out of the blue. Your testing and example has the databases WITH AN ALREADY reference set, and you now re-registering the .dll used, but with the same name!!! it is for this reason the flip is occurring here, since the path name to the .dll changes, but not the text reference you see/use/pick when setting up the reference in the first place.
In fact, I would suggest you test this with both .dll's registered, and then set a reference in Access to both .dlls at the same time. Doing so will make what is occurring here very clear!
Now, it is possible that the above is not your case and scenario, and somthing else may well be going on here. But, I would test this with BOTH .dlls registered, and in VBA references settings, now have a reference to both .dlls. Do that, and you get your answer as to what is going on here.
Name
attribute in thedev.vbp
andprod.vbp
files are set to 'dev' and 'prod', respectively. This has always been enough for the COM system to tell them apart in the past.prod
project is a snapshot in time ofdev
. Thedev
compatibility target is copied toprod
as part of this process. So, they share the same COM interface until breaking changes get made in thedev
project. Thanks for your input.