Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access library reference broken - ideas needed

Posted on 2014-03-23
5
Medium Priority
?
327 Views
Last Modified: 2014-03-23
Dear experts -
We have a new form that is used only by 2 users (out of 15); but that form uses a special library based on special software installed on those local machines.
So, when we put the database on the server, users who don't have that library can't run the application, they get a broken library reference.
How can I solve this?
I like having everything in one application, so the idea of splitting off a small app for the 2 users is a bit of a pain and a little less easy to manage.
Any ideas?
Thanks!
0
Comment
Question by:terpsichore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:ChloesDad
ID: 39948670
When you add a reference to a dll in an application, it checks for all being available on start-up. If one isn't then you get an error.

You have the following solutions

1 Install the special software on all machines
2 copy the required dlls to the database folder so that the program can see them
3 Split this feature to a separate program
0
 
LVL 58
ID: 39948671
<<Any ideas?>>

 Use late binding for deployment.   ie. instead of for example:

Dim objOutlook as Outlook.Application

you do:

Dim objOutlook as Object

By dim'ing it as a generic object, you won't have a problem with the reference because you don't need one.

  You can then use GetObject()/CreateObject() to try creating an instance, and if an error, trap the error.

Here's a little more on binding in general if your interested in some details:

Using early binding and late binding in Automation
http://support.microsoft.com/kb/245115

Jim.
0
 

Author Comment

by:terpsichore
ID: 39948699
Thanks, Jim -
Specifically, I am trying to add a reference to something called "Pawcom2 Library" which on the local machine will be:


How would I refer to this?
C:\Multiware\PawCom2\PawCom2.tlb

Currently there is code in modules such as the following - would this have to be changed as well?

Option Compare Database
Option Explicit

    Dim bVendor As New PawCom2.Btrieve
    Dim oVendor As New PawCom2.Vendors
    Dim bts As New PawCom2.bts
    Dim ptf As New PawCom2.ptf

Thanks!
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 39948720
It would be:

 Dim bVendor as Object

 Set bVendor = CreateObject("PawCom2.Btrieve")

<<Currently there is code in modules such as the following - would this have to be changed as well>>

  Yes, all that code would have to be changed.  In order to live without the reference, you must late bind.   By doing that, the automation objects methods and properties are not accessed until you go to use them.

 So when late binding,  you can check for existence of the app on a users machine and if not found, not execute any code that goes against it.  Result is no errors.

Jim.
0
 

Author Closing Comment

by:terpsichore
ID: 39948722
exactly what we needed. thank you.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question