Solved

Access library reference broken - ideas needed

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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 …

738 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