Trouble with references

G

Guest

Hi -

I have an Access application that builds a Visio chart from data stored in
one of the tables. The problem is, when someone else tries to use it, it
gives lots of errors because it's looking for all the Visio-related DLLs that
I references in the code section. We both have Access and Visio 2003 on our
machines. Does anyone know how to handle this? Is there a way to package
the app with all the necessary files?


Thanks a lot for any help!

Dan
 
6

'69 Camaro

Hi, Dan.
We both have Access and Visio 2003 on our
machines. Does anyone know how to handle this? Is there a way to package
the app with all the necessary files?

Access is "looking" in the wrong directories for the library files because
his workstation's directory structure is different from yours. Either
configure his workstation to match yours in paths and file names, or
configure yours to match his. Or use late binding in the VBA code and
remove all library references, except for the default library references,
i.e., Access, VBA, and DAO and/or ADO.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blog: http://DataDevilDog.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
T

Tony Toews [MVP]

Dan said:
I have an Access application that builds a Visio chart from data stored in
one of the tables. The problem is, when someone else tries to use it, it
gives lots of errors because it's looking for all the Visio-related DLLs that
I references in the code section. We both have Access and Visio 2003 on our
machines. Does anyone know how to handle this? Is there a way to package
the app with all the necessary files?

Hmm, this shouldn't be happening assuming you both have the same
version of Visio. Are the versions the same? Possibly one of you is
more up to date on patches.

Also to follow up on Gunny's posting with more information on late
binding.

Late binding means you can safely remove the reference and only have
an error when the app executes lines of code in question. Rather than
erroring out while starting up the app and not allowing the users in
the app at all. Or when hitting a mid, left or trim function call.

You'll want to install the reference if you are programming or
debugging and want to use the object intellisense while in the VBA
editor. Then,. once your app is running smoothly, remove the
reference and setup the late binding statements.

Sample code:
' Declare an object variable to hold the object
' reference. Dim as Object causes late binding.
Dim objWordDoc As Object
Set objWordDoc = CreateObject(" Word.Document")

For more information including additional text and some detailed links
see the "Late Binding in Microsoft Access" page at
http://www.granite.ab.ca/access/latebinding.htm
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
G

Guest

Thanks, Tony. The versions are the same and would suspect that the patches
are also. I work for Boeing and their s/w configurations are all automated
and pretty tightly controlled. When I finally get past all the startup
errors, I go into the code and there are several references that say
"MISSING:...". They or anything similar don't even appear in my list to add.
How can I get access to them?

Thanks so much for your help!

Dan
 
T

Tony Toews [MVP]

Dan said:
Thanks, Tony. The versions are the same and would suspect that the patches
are also. I work for Boeing and their s/w configurations are all automated
and pretty tightly controlled. When I finally get past all the startup
errors, I go into the code and there are several references that say
"MISSING:...". They or anything similar don't even appear in my list to add.
How can I get access to them?

What are the missing references? Visio?

From http://www.accessmvp.com/djsteele/AccessReferenceErrors.html you
can use the following code.

Sub ListReferences()
Dim refCurr As Reference

For Each refCurr In Application.References
Debug.Print refCurr.Name & ": " & refCurr.FullPath
Next

End Sub

Although that might not work if the references are missing. Or may
not give you an indication of which are missing.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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