want to hardcode and include "references" libraries

G

Greg Green

Windows 2000
Access XP (2002)

I'd like to hardcode the libraries referenced and include them with my .mdb
and .mde files when I deliver them. Though my clients have the same version
of Access, their references are sometimes in another location and when
Access opens the file and does not find its references, it cannot run my
code.

What are the options for handling this?

Thanks in advance, Greg
 
R

Rick Brandt

Greg Green said:
Windows 2000
Access XP (2002)

I'd like to hardcode the libraries referenced and include them with my .mdb
and .mde files when I deliver them. Though my clients have the same version
of Access, their references are sometimes in another location and when
Access opens the file and does not find its references, it cannot run my
code.

What are the options for handling this?

Don't use hard-coded references :)

Honestly, it really is a bad idea to use anything but the default references and
when you need to use outside libraries there is no reason not to use late
binding to avoid these issues.
 
G

Greg Green

Hi Rick

Why not? From my perspective what I know is one of my clients has a machine
configured such that the references are located in different places on his
machine. As a result he can't open my files while everyone else can. Fixing
his install involves interfacing with an IT department that makes lives
miserable. This is my logic.

What is late binding? Thanks - Greg
 
R

Rick Brandt

Greg Green said:
Hi Rick

Why not?

Because they break (as you are experiencing).
From my perspective what I know is one of my clients has a machine
configured such that the references are located in different places on his
machine. As a result he can't open my files while everyone else can. Fixing
his install involves interfacing with an IT department that makes lives
miserable. This is my logic.

What is late binding? Thanks - Greg

Late binding is making calls to external libraries without setting a
reference to them. This has the following advantages.

No missing references which cause LOTS of errors, not just errors involving
the code that uses the missing library. With late binding a PC that does
not have the library registered will get errors when attempting those
functions that are dependant on the library, but the rest of the app will
still work fine. With a missing hard reference, many built in Access
functions fail to work so the whole app can be made useless.

Version independence. Unless you make a call to a version dependent
function (rare) your code will not care what version of the outside library
is installed on the PC. With a hard reference (to Outlook for example)
every user of your app has to have the same version installed. With late
binding this is not required.

If you do Google search on "Late Binding" you should get plenty of
information.
 

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