Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying a certain file with ActiveX

Status
Not open for further replies.

kshadden

IS-IT--Management
Jun 18, 2003
19
US
I have an Access database that has an ActiveX control on a form that displays a map from Microsoft Mappoint when it opens. However, the code I have obtained only opens the default Mappoint map and I want to open and display a map that already has routes on it. My code is:

Option Compare Database

Dim objMap As MapPoint.Map
Dim objPin As MapPoint.Pushpin

Sub Form_Load()

Set objMap = MPC.NewMap(geoMapNorthAmerica)
MPC.Toolbars.Item("Navigation").Visible = True

'This is done in the Form_Load so that the DataSets(1).Delete does not bomb in Form_Current the first time it is run
Set objPin = objMap.AddPushpin(objMap.FindAddressResults(Me!Address, Me!City, , Me!State, Me!Zip)(1))

For Each objPlaceCat In objMap.PlaceCategories
objPlaceCat.Visible = False
Next

End Sub

Does anyone know the syntax to use to open or set the object, for example, c:\My Documents\My Map

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top