Results 1 to 13 of 13
  1. #1
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Fixing Broken Reference in RunTime (Access 2002)

    Has anyone ever managed to repair a broken reference in AXP when the application is run using the runtime engine? I'm beating my head against that one and have only found vague references that seem to imply it can be done, but I'll be darned if I can make it work. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

    I've fully disambiguated the code and called it from an autoexec or from a startup form and neither one works in runtime, although the autoexec works properly when run from the full installed version. <img src=/S/help.gif border=0 alt=help width=23 height=15>
    Charlotte

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Fixing Broken Reference in RunTime (Access 2002)

    I've not done that, but in theory it seems you should be able to - though there may be issues with priviledges and such. We do something a bit like that however in a VB module where we register ActiveX controls and it seems clean. Hopefully somebody else has more experience with runtime issues.
    Wendell

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Fixing Broken Reference in RunTime (Access 2002)

    Do you have code to fix the reference, but it isn't working? I don't have alot of experience in this area (mostly thru sheer luck!), but I don't remember reading anything about not being able to fix references in a .mdb file in the runtime; although you can't fix references in a .mde, as I understand it.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixing Broken Reference in RunTime (Access 2002)

    Actually, I've found that you can *fix* them from runtime if you carefully disambiguate the code and call it before anything else in the autoexec, the problem seems to be figuring out whether they're broken! <img src=/S/aflame.gif border=0 alt=aflame width=16 height=16> The IsBroken property of the references is as flakey as it was in Access 97 and Application.BrokenReference has been wrong 100% of the time so far. Part of my difficulty may be Windows XP though. I've actually seen the darn thing report under runtime that the reference was fine and return the FullPath of the reference pointing to the actual location of the file even though the reference itself is marked as MISSING and points to a different location when you open the application from a normal installation and with the shiftkey held down. Of course, I've also seen it fix itself spontaneously when I turned my back on it.
    I'm rapidly losing my mind over this! <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    Charlotte

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Fixing Broken Reference in RunTime (Access 2002)

    References are probably the primary reason I'm trying to move away from runtimes. In a very controlled circumstance, it is ok; but too often it leads to the headaches you're encountering. BTW, can a runtime be updated by the user by going to the Office Updates website, or do you have to re-install the runtime with new patches?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixing Broken Reference in RunTime (Access 2002)

    The runtime can't be updated like that in Office 2000 and earlier. There are patches for the runtime for developers for 2002, but I don't believe a user can apply them. You wouldn't want that anyhow. The developer needs to apply any patches and see how it affects the application rather than getting a call from the user that the app is doing odd things for no reason. <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>
    Charlotte

  7. #7
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Fixing Broken Reference in RunTime (Access 2002)

    But that means sending out and re-installing the runtime, correct? The runtime in Access97 seemed to be easy; I guess one reason was because by the time I got it, it was already thru a couple of SR's. Now it just seems to be more of a pain than it's worth. I'm getting to the point of just not mentioning it anymore to potential clients.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixing Broken Reference in RunTime (Access 2002)

    I probably wouldn't use a runtime for a potential client of a custom application, although I have at times in the past. In this case, though, it's a commercial application, so we can't require Access installed on the machines that run it. In that situation, runtime is the only answer.
    Charlotte

  9. #9
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Fixing Broken Reference in RunTime (Access 2002)

    Damned if you do, damned if you don't! <sigh>
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixing Broken Reference SOLVED (Access 2002)

    Well, sort of. It seems that the code doesn't run under the runtime engine because WindowsXP/Access XP resolves the reference on the fly, at least if it is in a reasonably accessible folder, so it insists that the reference isn't broken. The same tests that come back under a full installation and tell me there is a broken reference skate right over it in runtime and think everything is A-OK. However, when you open the application again under the installed version of Access, it comes up with a broken reference. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> Heaven knows what happens on any other version of Windows!
    Charlotte

  11. #11
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixing Broken Reference in RunTime (Access 2002)

    (Edited by HansV to activate URL - see <!help=19>Help 19<!/help>)

    Charlotte,

    Have a look at http://www.trigeminal.com/usenet/usenet026.asp?1033

    You may already know all this but it may be of some help.

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixing Broken Reference in RunTime (Access 2002)

    Yes, I am familiar with Michael Kaplin's article and I have carefully disambiguated all the code. Unfortunately, that doesn't solve the problem of why Access doesn't recognize the broken reference when it opens under the runtime engine. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  13. #13
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixing Broken Reference SOLVED (Access 2002)

    The key to this was finding a way to determine at runtime that a reference is broken, since the IsBroken and BrokenReference properties do not return correct values at runtime. The answer is to run a query that contains a built in function like Date() or Left() and trap the error that results if there is a broken reference. This will return an accurate result even when Access thinks it has resolved the broken reference. I was tearing my <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> because even though the reference *appeared* to have resolved, things were still breaking, like controls with the Date() function in their control source, which showed a #Name? error.

    I have to thank Gustav, from the Access-D list for coming up with the method. It is a lifesaver.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •