Charlotte Foust
cfoust at infostatsystems.com
Wed Jul 23 12:51:10 CDT 2003
I've tested the macro repeatedly in XP and haven't had any errors. It compiles the application properly after fixing the reference with nary a squawk. The undocumented SysCmd never did. Nice to see there has been *some* improvement in 2002! Does the macro work in A97 if you use just compileallmodules instead of compile and save? Charlotte Foust -----Original Message----- From: Gustav Brock [mailto:gustav at cactus.dk] Sent: Wednesday, July 23, 2003 9:34 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Broken References in Runtime AXP Hi Charlotte If I run such a macro in A97 it tells, when trying to compile and save, that "this command or action isn't available right now" ... and errors out. If it works in Access XP, this is a different or improved behaviour compared to A97. To circumvent this in A97 I had to use the method with the form and a timer which I described in my message 2003-07-19 08:11. And yes, your macro can use the condition: FixReference()=True /gustav > OK, here's the situation as it stands. Using a query, as Gustav > suggested, seems to give me an accurate way to test for a broken > reference. I call that test from my FixReference routine and if it's > true, I repair the library reference by removing it add adding it > back. RefLibPaths gives me the correct path for adding it back, so > that part is easy. This works in runtime or full installation and > only performs the fix if the reference is actually broken. > The compile issue is a bit trickier and I found a kludge, but I'm open > to suggestions if anyone has them. The undocumented SysCmd(504, > 16483) doesn't error but it doesn't seem to compile either. I ran > into a post on the net that suggested it might not work with modules > open (didn't say how you ran code otherwise, but I assume the > reference was to the 97 > VBE) so I started thinking "macro". If found that if I modify my > autoexec macro, it will run the compile for me. So an autoexec that > looks like this compiles the app after fixing the reference: > Condition Action Command > IIf(FixReference()=True,True,False) > ... RunCommand > CompileAndSaveAllModules > OpenForm > frmSplash > Charlotte Foust _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com