References

G

Guest

I have several general purpose functions and procedures that are used across
several database applications. After tiring of cutting and pasting and
maintaining multiple versions of the same code, I copied them to a new
database "CodeLibr".

I set a reference to this file, which is stored in a shared folder on the
network, in the front-end file. My beta-tester user then downloaded the
front-end to his hard drive, along with the shortcut that uses the secure
workgroup. The database launches but a textbox on the Main Menu form that
uses a function in the library was displaying "#NAME#" rather than the
correct value. Logged on as this user, I loaded the VB Editor, entered my
code password, and looked at the references. It lists "CodeLibr" as
"MISSING". I attempted to browse and reset it, but it won't accept it.

Does anyone have any ideas?

Thank you.
Sprinks
 
G

Granny Spitz via AccessMonster.com

Sprinks said:
It lists "CodeLibr" as
"MISSING". I attempted to browse and reset it, but it won't accept it.

Open the references window and remove the "CodeLibr MISSING:" reference and
then add another library reference. (Any one. It doesn't matter. Just
remember which one.) Close the references window and recompile. (It will
fail.) Open the references window again and remove the extra library
reference you added last time, then add the CodeLibr library. Close the
reference window again and recompile.

Do you still get an error message? If so, what is it?
 
G

Guest

Granny,

I gather this condition occurred because the front-end file was copied from
a network folder to the local hard drive. As this will be done each time I
issue an updated front-end file, it seems I need either to reestablish a
broken link programmatically or abandon the Library approach, and import the
modules I need into the front-end.

I don't have the latest version of Litwin/Getz et al here, but the 97
Developer's Handbook describes how to do repair a broken link, but it seems
like a lot of effort. Do you have any suggestions?

Thank you.
Sprinks
 
G

Granny Spitz via AccessMonster.com

Sprinks said:
I gather this condition occurred because the front-end file was copied from
a network folder to the local hard drive.

No, hon. This happens because another computer opened the database file, and
when the items in the references collection were resolved at startup, at
least one of the library references on *that* computer wasn't found, or else
it used a different path to the library than what was stored in the file.
These stored paths are probably the paths on *your* computer, since you were
probably the last one who opened the file to test it before your user did.
The algorithm used for resolving references isn't very robust for non-built-
in references, so sometimes you need to give a little nudge to reset the
references collection by either adding a new reference or deleting an
existing reference. The references window has to close and often a compile
command given, in order for the references collection to be reset. Then you
can re-add that missing reference library to the collection, and it will be
accepted.
As this will be done each time I
issue an updated front-end file, it seems I need either to reestablish a
broken link programmatically or abandon the Library approach, and import the
modules I need into the front-end.

I'd reestablish the links programmatically at startup if it's an MDB file,
and I'd import the library modules into the front end if it's an MDE file and
making both the front end and the library MDE's didn't keep those references
set in stone.
the 97
Developer's Handbook describes how to do repair a broken link, but it seems
like a lot of effort. Do you have any suggestions?

You can write a dynamic link library and expose the functions publicly, store
this library on the network in a public shared directory, then use a 'Declare
Function functionName Lib "blahblahblah" ()' in your VBA modules for each
function your front end uses, but that seems like a lot more effort to me.
Or you could configure your computer's path and file names for all references
to match those of your users. Or you could configure your users' computers'
paths and file names for all references to match yours on your computer.

If you choose this last technique, be prepared with a box of donuts and a
baseball bat. When it comes to making changes on their computers, some
people can easily be bribed. Others can't. ; )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top