Adding Broken References

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JD

    #1

    Adding Broken References

    I'm trying to add a custom utility.mde reference to an application
    from code using the standard Application.Ref erences.AddFrom File code.
    IT has worked really well with A2K for a couple of years but in
    version 10.0 I'm having a bit of trouble.

    With the latest Access there are 2 changes that are annoying. First,
    a 'broken reference' warning popup appears before my code has a chance
    to resolve the problem. It kinda makes the clients nervous. I worked
    around that by trapping form error 29070 and suppressed the popup so
    the code can do its thing.

    The second change is my real problem. While I can add a new reference
    it doesn't get saved unless the app was opened exclusively!

    Anyone know of a way to get the new reference to stick without having
    to open with the /excl switch???

    Thanks
    JD
  • Peter De Baets

    #2
    Re: Adding Broken References


    "JD" <flyingnorth@ro cketmail.com> wrote in message
    news:93ae6148.0 310081235.14345 736@posting.goo gle.com...[color=blue]
    > I'm trying to add a custom utility.mde reference to an application
    > from code using the standard Application.Ref erences.AddFrom File code.
    > IT has worked really well with A2K for a couple of years but in
    > version 10.0 I'm having a bit of trouble.
    >
    > With the latest Access there are 2 changes that are annoying. First,
    > a 'broken reference' warning popup appears before my code has a chance
    > to resolve the problem. It kinda makes the clients nervous. I worked
    > around that by trapping form error 29070 and suppressed the popup so
    > the code can do its thing.[/color]

    Put your code to set the reference in a separate module. Make sure this code
    executes BEFORE any code executes in a module that requires the reference.

    Since Access loads modules as-needed, you will get a broken reference error
    only when the module requiring the reference gets loaded. If you can put off
    loading that module during startup, then you can run code to set your
    reference from a separate module.
    [color=blue]
    >
    > The second change is my real problem. While I can add a new reference
    > it doesn't get saved unless the app was opened exclusively!
    >
    > Anyone know of a way to get the new reference to stick without having
    > to open with the /excl switch???[/color]

    Is your setup client/server, oir are you opening one Access db from a server
    for multiple users? I'd suggest using the former, then you can open the
    client .mdb file exclusively and set your reference.

    Hope this helps,


    --
    Peter De Baets
    Peter's Software - MS Access Tools for Developers

    [color=blue]
    >
    > Thanks
    > JD[/color]


    Comment

    • JD

      #3
      Re: Adding Broken References

      Thanks Peter. I should have been more specific.

      It is a split database setup and while it is feasible to run all the
      front ends with /excl it seems odd that I should have to. Any idea
      what has changed between versions that now requires this to be the
      case????

      Your suggestion re offloading all the functions to a separate module
      was how I used to do it with A2K. I used to make sure there were no
      calls to that reference in my startup screen and would iterate through
      all the refs looking for ref.IsBroken Unfortunately, that yielded
      inconsistant results in the new version.

      The most expedient solution was to just do a call right of the bat and
      trap the error and force the remove/add code for that specific
      reference.

      Guess I'll have to give in and change all the shortcuts.

      Thanks again.
      JD


      "Peter De Baets" <N-PHO@NOSPAMpeter ssoftware.com> wrote in message news:<N0%gb.523 103$Oz4.380564@ rwcrnsc54>...[color=blue]
      > "JD" <flyingnorth@ro cketmail.com> wrote in message
      > news:93ae6148.0 310081235.14345 736@posting.goo gle.com...[color=green]
      > > I'm trying to add a custom utility.mde reference to an application
      > > from code using the standard Application.Ref erences.AddFrom File code.
      > > IT has worked really well with A2K for a couple of years but in
      > > version 10.0 I'm having a bit of trouble.
      > >
      > > With the latest Access there are 2 changes that are annoying. First,
      > > a 'broken reference' warning popup appears before my code has a chance
      > > to resolve the problem. It kinda makes the clients nervous. I worked
      > > around that by trapping form error 29070 and suppressed the popup so
      > > the code can do its thing.[/color]
      >
      > Put your code to set the reference in a separate module. Make sure this code
      > executes BEFORE any code executes in a module that requires the reference.
      >
      > Since Access loads modules as-needed, you will get a broken reference error
      > only when the module requiring the reference gets loaded. If you can put off
      > loading that module during startup, then you can run code to set your
      > reference from a separate module.
      >[color=green]
      > >
      > > The second change is my real problem. While I can add a new reference
      > > it doesn't get saved unless the app was opened exclusively!
      > >
      > > Anyone know of a way to get the new reference to stick without having
      > > to open with the /excl switch???[/color]
      >
      > Is your setup client/server, oir are you opening one Access db from a server
      > for multiple users? I'd suggest using the former, then you can open the
      > client .mdb file exclusively and set your reference.
      >
      > Hope this helps,[/color]

      Comment

      Working...