Solved

Access library reference broken - ideas needed

Posted on 2014-03-23
5
303 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 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

763 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