Solved

Access library reference broken - ideas needed

Posted on 2014-03-23
5
282 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
  • 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 57
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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now