MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




Adding pushpins by lat/long or address using MPC in MSAccess

This is a discussion on Adding pushpins by lat/long or address using MPC in MSAccess within the MapPoint Desktop Discussion forums, part of the Map Forums category; I'm trying to use MPC in an access database form that will allow me to add a pushpin by either ...


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-01-2004
GM GM is offline
Junior Member
White Belt
 
Join Date: Nov 2004
Posts: 2
Adding pushpins by lat/long or address using MPC in MSAccess

I'm trying to use MPC in an access database form that will allow me to add a pushpin by either lat/longs or if these fields are null, by address. The code I'm using is shown below but I keep getting an error message on the addpushpin line.

Could anyone provide a working solution to this problem?


Private Sub Form_Current()


Dim oMap As MapPoint.map
Dim oLoc As MapPoint.location

' If objMap.DataSets(1) <> Null Then
On Error Resume Next
oMap.DataSets(1).Delete
On Error GoTo 0
' End If

Set oMap = MPC.NewMap(geoMapNorthAmerica)
MPC.Toolbars.Item("Standard").Visible = True
MPC.Toolbars.Item("Navigation").Visible = True
oMap.Application.Units = geoMiles

If (Me!Latitude) = Null Then
Set oLoc = oMap.FindAddressResults(Me![Address1], Me![City], , Me![prov], Me![Country])(1)



ElseIf (Me!Latitude) <> Null Then
Set oLoc = oMap.AddPushpin(oMap.GetLocation(Me!Latitude, Me!Longitude, 100))


End If

oMap.AddPushpin oLoc
oLoc.goto
Symbol = 82


End Sub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
adding, address, lat or long, mpc, msaccess, pushpins


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Adding a PushPin from a Long/Lat position zadic MapPoint Desktop Discussion 2 10-06-2005 12:33 PM
Get address of lat/long Anonymous MapPoint Desktop Discussion 1 05-13-2004 10:54 AM
Getting the lat/long from an address Anonymous MapPoint Desktop Discussion 1 03-25-2004 07:22 PM
Adding Pushpins Matrices MapPoint Desktop Discussion 1 11-28-2003 10:32 AM
Is there a fast way of adding pushpins? matt1168 MapPoint Desktop Discussion 3 07-24-2003 09:44 AM


All times are GMT -5. The time now is 11:53 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
MP2K Magazine
Visitor Map



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67