By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 614 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

Adding Broken References

P: n/a
JD
I'm trying to add a custom utility.mde reference to an application
from code using the standard Application.References.AddFromFile 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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"JD" <fl*********@rocketmail.com> wrote in message
news:93**************************@posting.google.c om...
I'm trying to add a custom utility.mde reference to an application
from code using the standard Application.References.AddFromFile 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.
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.

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???
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
http://www.peterssoftware.com

Thanks
JD

Nov 12 '05 #2

P: n/a
JD
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-***@NOSPAMpeterssoftware.com> wrote in message news:<N0%gb.523103$Oz4.380564@rwcrnsc54>...
"JD" <fl*********@rocketmail.com> wrote in message
news:93**************************@posting.google.c om...
I'm trying to add a custom utility.mde reference to an application
from code using the standard Application.References.AddFromFile 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.


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.

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???


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,

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.