[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Referencing a program not installed

Posted on 2011-09-03
7
Medium Priority
?
294 Views
Last Modified: 2012-05-12
I have created an Access app that gives the user the ability to create on a form a map using MapPoint or even export a map to MapPoint. If a user does not have MapPoint installed they get all kinds of nasty messages. Is there anyway to cause this not to happen. If so, I could then disable that user from opening the form used for creating the maps.
0
Comment
Question by:Dale Logan
[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
7 Comments
 
LVL 10

Expert Comment

by:plummet
ID: 36478352
Hi,

You could add a function into a module that checks to see if the reference is OK or broken - like this:

Function CheckReference(sRefName As String) As Boolean
  
  CheckReference = Not (Application.References(sRefName).IsBroken)

End Function

Open in new window


You could call this function using the registered short name of the reference - for example, the reference you see as "Visual Basic for Applications" in Tools/references has the short name "VBA", so you'd check this was OK like this:

if CheckReference("VBA") then debug.print "OK" else debug.print "Missing!"

Open in new window


If your shortname is "Mappoint", as it may well be, you'd substitute "Mappoint" for "VBA" in the example above. You can then use the check to send the user off elsewhere as you like.

I hope that helps, and makes sense.

0
 
LVL 35

Expert Comment

by:Norie
ID: 36478387
How are you using MapPoint on the form?
0
 

Author Comment

by:Dale Logan
ID: 36478471
plummet, I will give that a try in a couple of hours and will let you know how it goes. Sounds promising.

imnorie, You can add a MapPoint ActiveX control to a form. In that control I give the user the ability to create territory maps, sales volume maps, they can plot customers by location, tons of stuff. They can even export a map to MapPoint. Here's a link to all of the coding options:

http://msdn.microsoft.com/en-us/library/aa562314.aspx
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 35

Expert Comment

by:Norie
ID: 36478506
What I was going to suggest was using late-binding so you wouldn't need a reference.

I don't think that will work if you are adding the control to a form though.:)

0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 36480508
You won't be able to do this since you're using ActiveX controls. Your app will require that control to be present on the end user machine. You cannot distribute this control, either, so if you need this functionality that you will need to require your end users to have the full version of MapPoint on their system.

You could build two different applications - one with the MP reference, and one without, and then distribute the appropriate one to your end users. That's a pain to maintain, of course, since you must remember to make changes in both files.
0
 
LVL 35

Expert Comment

by:Norie
ID: 36480515
LSM

I thought that might be the case but wasn't sure.

I assume the problem is that a missing control leads to a missing reference which leads to all sort of problems elsewhere.
0
 
LVL 85
ID: 36483540
That would be my assumption as well.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

650 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