open a map with vba in a mdb

W

wilfried

I want to open a map in a mdb with vba which is linked to a result of a
field in the active form

Field on the active form shows 3 the map to find is P_3

The path is C:\wilfried\Stamps\P_3

And mery Christmas for everyone
 
A

Arvin Meyer [MVP]

If you're using Microsoft MapPoint, you can directly use VBA to open maps
and get directions. Otheer programs may or may not have a hook to a specific
map. If your maps are images, you can use an image control to open the map:

Me.ImageControlName.Picture = "C:\wilfried\Stamps\P_3.jpg"

otherwise use ShellExecute to open your map program:

http://www.mvps.org/access/api/api0018.htm

--
Arvin Meyer, MCP, MVP
Microsoft Access
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
W

wilfried

I thank you very much for your quick reply.

I only want to consult a existing map and not to open a file. The map
to open depends from the results of the field on the active form:

If the field shows 3 the map must be P_3
If the field shows 4 the map must be P_4

The path is C:\Wilfried\Stamps\P_X (X is the number shown on the
field).


Wilfried



Arvin Meyer [MVP] schreef:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top