Referencing a program not installed

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.
Dale LoganConsultantAsked:
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
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.

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.

NorieVBA ExpertCommented:
How are you using MapPoint on the form?
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Dale LoganConsultantAuthor Commented:
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:
NorieVBA ExpertCommented:
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.:)

NorieVBA ExpertCommented:

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.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
That would be my assumption as well.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.