Missing References

  • Thread starter Thread starter Matt Kisasonak
  • Start date Start date
M

Matt Kisasonak

Is there a way to remove missing references when an mdb
is opened and eliminate the error.

I have an .mdb that is copied to multiple workstations as
a front-end file. It contains VBA that manipulates
another drafting program. Some users don't have this
program. Hence the need to remove these references.

I also have VB6. Would it be simpler to move these
functions to a dll or something and pass the values to
the dll. Is this possible? I have not experience at
creating dll's but have created a few executables.

Pardon my stupidity.
 
Modify the code that prevents users from running sections of code where
you know the missing link exists.

If (user has drafting) Then
'all drafting code here
end if

Create an MDE file by going to Tools->Database Utilities->Make MDE
File. An MDE is an access program that has the code precompiled, which
prevents users from modifying code. Place this MDE on a network drive
if possible, and create a shortcut on each of your user's workstations
to this same MDE. Multiple users can access the same MDE at the same
time. If you don't have a network, distribute a copy of the MDE file
to each of your workstations.

The MDE will not prompt the user if a reference is missing. The code
will error out only if it is run, therefore the key is to check if the
user has the drafting program before you try to run it.
 
Thanks Allen, I think you killed two birds with one
stone. I haven't tried them yet but I was also having a
problem with an ActiveX (Solid Edge Viewer) control not
registering on one of my machines. This happened
sometimes but not all the time. I think it is because
the software was loaded twice on this machine and the
registery is %&$#. But the later resolution mentioned in
the artical has the same error I was getting. Thanks
again.

Matt
 
Unfortunately, a missing reference can cause other unrelated code to fail,
so I don't think your advice is particularly sound.

As well, having multiple users in the same database is a known recipe for
database corruption. The database should be split into a front-end
(containing the queries, forms, reports, macros and modules0, linked to a
back-end (containing the tables). Only the back-end should be on the server:
each user should have his/her own copy of the front-end.
 

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

Back
Top