Charlotte Foust
cfoust at infostatsystems.com
Fri Jul 18 10:22:35 CDT 2003
Shamil, I wasn't ignoring your suggestion but I agree that the help article is not accurate. In fact we started out putting the code library in the same folder with the application. Guess what? When the app was installed in a different folder from the one the setup was created from, Access found the file and did not report a broken reference but strange things happened that were only cured by unchecking and resetting the reference. I've played with RefLibPaths but I did not see it resolve any references automatically, at least not when I broke one deliberately, so I'm a bit wary of relying on it. The search for solutions continues ... Charlotte Foust -----Original Message----- From: Shamil Salakhetdinov [mailto:shamil at smsconsulting.spb.ru] Sent: Thursday, July 17, 2003 7:28 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Broken References in Runtime AXP > I'm just going off to sit in the corner and gibber. Charlotte, I'm sorry I don't particiapte actively in this thread - please reread very carefully this paragrapgh of MS Access online help: <<<<<<<< d.. If you set a reference to a project or type library from Microsoft Access and then move the file that contains that project or type library to a different folder, Microsoft Access will attempt to locate the file and reestablish the reference. If the RefLibPaths key exists in the registry, Microsoft Access will first search there. If there's no matching entry, Microsoft Access will search for the file first in the current folder, then in all the folders on the drive. You can create the RefLibPaths key by using the Registry Editor in Windows, under the registry key \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\version\Access. For more information about using the Registry Editor, see your Windows documentation. >>>>>>>> I think this is the key sentence "Microsoft Access will search for the file first in the current folder, then in all the folders on the drive." - I mean that MS Access will search first in the CURRENT folder, then in ALL the folders on the drive. I don't think it's 100% accurate - if MS Access have been searching in ALL the folders on the drive for a broken reference then it would have worked ages to resolve such refs on MS Access program start-up. So I think it searches first in the current folder and then starting from the current folder in all the subfolders and probably in all the parent folders of the current folder and their subfolders and then (of before?) in all the folders listed in PATH environment variable. This extra-intelligence of MS Access sometimes drives developers crazy... Solution, which I used was to develop MS Access projects on different drive(s)/under different paths than deployment drive/directory and NEVER put referenced MS Access databases in the directories from PATH environment variable. I've also used RefLibPaths separatley and with SageKey scripts to install runtime(Access97) and its environment. Please reread again the sentence above - when RefLibPaths is used then MS Access FIRST searches for broken references in the directoriy from RefLibpaths... But if the reference ISN'T broken then even if RefLibPaths is specified MS Access DOESN'T use its value for resolve a reference on runtime - I think this is contr-intuitive and this is why is good to force the refs being broken by having your development drive/directory different from deployment ones... Why you can't use RefLibPaths with your rutime environment? Shamil ----- Original Message ----- From: "Charlotte Foust" <cfoust at infostatsystems.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Friday, July 18, 2003 4:38 AM Subject: RE: [AccessD] Broken References in Runtime AXP > Well, I'm now officially round the bend. I just sat here and kept > seeing the idiot thing report that it found the broken reference in > the right location, which is where the file *is* but not where the > reference actually pointed. The FullPath property of the reference > returned the right location instead of the broken one! Then I watched > the referenced library pop up in the project explorer even though it > wasn't there when I opened the project! I'm just going off to sit in > the corner and gibber. > > I'm running Windows XP and I wonder if that has anything to do with > it. I've also seen it report a broken reference and say it fixed it in > runtime and have the app appear to run OK but then when I opened it > normally and held down the shift key, the reference was broken. > Usually if it's broken it stays broken ... But not always! > Aaarrrgggghhhh!!! > > Charlotte Foust _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com