Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with Library References

Status
Not open for further replies.

sm43

Programmer
Dec 1, 2002
155
0
0
US

Hi,
I have a mixup rally going on with Library References in my Access VBA Application. I developed the application that someone at work now uses daily. that person made a slight change to the text of an email that goes out from the application through Outlook OLE Automation. EVersince then, all the Date() calls in the application do not get recognized unless we add Microsoft Word 9.0 Object Library to the library References. Now, the problem is that the same database is accessed from two different client computers for data-entry work off a file share. One of those computers has MS Access that doesn't have the Microsoft Word 9.0 Object Library Reference in it. so, the Date calls are not recognized whenever the Access application is run on that computer (off the file server ofcourse) and they show up as #Error#.

Now what do I do? I'm really confused about these whole references deal and their discrepencies. Shouldn't it all just matter on what references are set on the main fileserver copy of Access where the application actually resides. or shouldn't the client applications use the server's installation/resources to resolve all of its references.

just for the information, the other references that the application has are

Visual Basic for Application
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Outlook 9.0 Object Library


Frankly, why has the date() started requiring the Word library reference in the first place. What's that got to do with date?


Thanks.

Saad
 
Hi

First, the usual method to deploy a multi user Access APplication, is to split the application into two Mdb's (or possibly one mdb one mde).

The first (the Front End - FE) contains the Forms, Reports, Queries, VBA code, Macros, and has links (using linked table manager) to the:

The second (the Back End - BE) contains the datatables.

The FE is located on each users C: drive

The BE is located on a network Share

Now your references question.

The libraries must be present on each Users PC.

The sensible thing to do is to ensure each PC is set up in the same way, eg has MS Office in same directory etc, has same version of Office, etc in this way 'missing' libraries can be minimised.

But if that policy has not been followed then you need to reselect the libraries on each PC,

or

to add code to your application to check for missing references and to reconnect them. You could try the FAQ section of Tech-Tips for such code, or the Knowledge Base of Microsoft, or or even a search on "Missing Reference" on Google.

As to the use of the Word Library, I too am surprised, I thought the date function was in the Microsoft Office Version x.x, library, but I could be wrong.

Hope this helps

Regards

Ken Reay Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I seem to have seen several threads along these lines over recent days suggesting that this is not an uncommon problem. There seems to be concensus that in most cases Now() will work where Date() does not. Not an ideal solution, as it stores time as well which would have to formatted out if you only really want the date part, but might help in some circumstances. Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
 
Actually, the database had been created and developed considerably by someone else. I was brought in later. It was already up-and running when I came. The guy had set it up this way. Can the database still be split up into the seperate Front-end and Back-end without too much pain??


Yeah, we'll try to standardize our Microsoft Office environment on our User computers. Actually, I'm not even at the location where it's being used. I've just been developing remotely. There's somebody else there that puts the database on the network share. I've notified them.


Computer 1 doesn't have the Word reference library at all, and apparently we're being required to add that on Computer 2 for the date function to work there. surprisingly, Computer 1 doesn't need the Word reference for the date function. However it does need the Outlook reference and it only has Outlook 8.0 Object available so that creates a discrepancy with Computer 2 which has Outlook 9.0 .


Saad
 
A final thought. If you are using the Office Developer edition you can use the Access packager to create a installable version of your Access application. It includes all the required references and installs them on the client machine.
 
Oh, I thought I already had posted what we ultimately ended up doing. We just re-installed Office on the machine with the problem to bring it with the same version as the other machines, and the problem was gone..

Thanks for all the good advice.. I will use these suggestions when I take up any VBA project that I start MYSELF..

I don't have the Developer Edition.. just the Professional & Premium Editions.. can't use the Access packager then, haan?


Saad
 
Saad,
Making sure that all of the workstations have identical MS Office setups is a pretty good surefire solution.

There is possibly one other solution for you should this happen again. It's not pretty but it works. (At least for our company) Licensing issues aside. Simply put the missing DLL's on a common shared network drive and point the DLL references to them.

Good luck!

Ted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top