Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / May 2005

Tip: Looking for answers? Try searching our database.

Library versions cause "Missing Reference" error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Debbie - 20 May 2005 16:46 GMT
Our environment contains a split database on a server which all the
workstations run.  Some of the workstations have Win 98SE with Access 2000
and some have XP with Access 2002. They are at different service level.  
Every now and then, the Windows 98/Acc 2000 workstations will not be able to
open the database because they receive the message
"Can't find project or library".  

When I check the reference libraries I see that all the Win98 libraries have
the line:
"Missing Reference  MS Office 10.0 Project Library."
Once I reset the library to include MS Office 9.0 Project Library everything
is fine.  

Does anyone know why the libraries keep reseting the version they use?  I
checked the path and the correct 9.0 library is being referred to.  Any held
would be appreciated.  Thanks,
Debbie
Rick Brandt - 20 May 2005 18:48 GMT
> Our environment contains a split database on a server which all the
> workstations run.  Some of the workstations have Win 98SE with Access
[quoted text clipped - 13 lines]
> referred to.  Any held would be appreciated.  Thanks,
> Debbie

One should never add extra references to an Access app unless you are
absolutley positive that all users will have that external library installed
and in the same version.

You can re-write your code (minor changes usually) so that it uses late
binding and thus eliminate the need to set the reference.  This will in most
cases make your app version independent as well.  The exception would be if
you were calling a method or using a property that didn't exist in all
versions.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

Debbie - 23 May 2005 00:10 GMT
Rick,
I took all the default libraries when Access was installed, except for the
DAO 3.6 library.  Is the Office 10.0 Project Library needed?  Does the order
of the libraries matter?  Lastly, what did you mean by 'late binding'?  
Thanks much,
Debbie

> > Our environment contains a split database on a server which all the
> > workstations run.  Some of the workstations have Win 98SE with Access
[quoted text clipped - 23 lines]
> you were calling a method or using a property that didn't exist in all
> versions.
Tony Toews - 23 May 2005 04:58 GMT
>Is the Office 10.0 Project Library needed?  

Unlikely based on your comments.  Are you using Project in your Access
MDB anywhere?

Do you have any references besides the basic three?  Are you sure you
need them?  Write down the path and name of the extra ones, delete
from the references list and Compile and Save All.   Keep any
necessary references and ensure they are distributed to the target
system.

For a very detailed page on reference problems see
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

Ctrl+G will take you into the Debug/Immediate window.  Then click on
Tools on the menu bar and References.
The Access 2000 default references are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
 or
Microsoft DAO 3.6 Object Library

The Access 2002 default references when the MDB is created in Access
2000 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library

The Access 2002 default references when the MDB is created in Access
2002 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.5 Library.

>Does the order  of the libraries matter?  

When using both DAO and ADO yes unless you disambiguate.

>Lastly, what did you mean by '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
Signature

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

Rick Brandt - 23 May 2005 13:28 GMT
> Rick,
> I took all the default libraries when Access was installed, except
> for the DAO 3.6 library.  Is the Office 10.0 Project Library needed?
> Does the order of the libraries matter?  Lastly, what did you mean by
> 'late binding'? Thanks much,
> Debbie

This is not a question of what you did when you "installed" Access.  References
can be added per-file.  Open a new blank database and then open a code window
and look at Tools - References.  The ones you see there are the defaults (In
Access 97 there should only be three of them).

Often when "tinkering" with a file you can inadvertantly cause other references
to be added.  In these cases you can simply un-check them and the problem is
solved.  If you find after removing them that your project will no longer
complile then you ARE using that reference and you need to moidify the code that
is to late binding.

Late binding is a way to make calls to external libraries without having to add
a hard reference to that library.  If you do a Googoe search of tha Access
groups on "late binding" you will get lots of links discussing the issue.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

Debbie - 23 May 2005 14:37 GMT
Thank you both for your very comprehensive answers.  I did not fully
understand how libraries are used and added.  I am not using Project at all
so I don't know why it would bring that library in. When I've reset the 2002
libraries in the past, I reset them to:
Visual Basic for Applications
MS Access 10.0 Object Library
OLE Automation
MS DAO 3.6 Object Library
MS Active X Data Object 2.1 Library
MS Office 10.0 Object Libary

I will try those things you mentioned and recompile.  I will also learn more
about late binding on the forums.  Once that is cleaned up, it is likely the
problem will be resolved.  Thanks so much, you've really helped alot.
Debbie

> > Rick,
> > I took all the default libraries when Access was installed, except
[quoted text clipped - 17 lines]
> a hard reference to that library.  If you do a Googoe search of tha Access
> groups on "late binding" you will get lots of links discussing the issue.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.