Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 6 of 6

Mappoint and Access with ActiveX On A Form

This is a discussion on Mappoint and Access with ActiveX On A Form within the MapPoint Desktop Discussion forums, part of the Map Forums category; First, thanks to anyone who reads this thread. I have some experience with MS access with none in Mappoint. I ...

  1. #1
    jpateusa is offline Junior Member White Belt
    Join Date
    Jan 2007
    Posts
    4

    Mappoint and Access with ActiveX On A Form

    First, thanks to anyone who reads this thread. I have some experience with MS access with none in Mappoint. I have a form in ms access. On that form I have an activex control named Mappointctrl3. I also have a decimal format lat and long on the same form. I want to pass the lat and long to the activex control and have it display a map on the form. Does anyone have any example code or could point me in the right direction for some Mappoint reference material. I sure would appreciate your help and time. Thanks jason

  2. #2
    Paul Larson is offline Senior Member Green Belt
    Join Date
    Sep 2005
    Location
    Battle Creek, Michigan
    Posts
    136

    Re: Mappoint and Access with ActiveX On A Form

    assuming your textboxes for lat/lon are name txtLatitude and txtLongitude, and that you have opened a map on the control:

    With Mappointcontrol3.ActiveMap
    .Location=.GetLocation(cDbl(txtLatitude.Text),cDbl (txtLongitude.Text))
    .Altitude=1
    End With

  3. #3
    jpateusa is offline Junior Member White Belt
    Join Date
    Jan 2007
    Posts
    4

    Re: Mappoint and Access with ActiveX On A Form

    Paul, first, let me thank you for your help. You and those like you are why these sites are sooo helpful and work. Now, I tried the code sample you sent. Here is what I find. I have an active x control on my page that I have reinstalled to be mappointcontrol6. I am using mappoint 2006 in MS access. On my form (sample) I have a text box with the name, lat and long and the activex control for mappoint. I can make the maps work with mappoint running external to the form (stand alone and passing data to it) but I cannot get the activex box to work. Here is the code. The top section works fine and puts a pushpin on the map with the correct name. When I get to the lower code (revised from what you sent me to accomodate my decimal lat's and long's) it gives me the error that "object variable not set". When I type With MappointControl6. a list of parameters comes up. None of which are activemap, map, anything of the like. They are about, application, bordor color, border style, border width, cancel, class, etc. Something tells me that this activex will not work inside ms access. I am using access 2003. Let me say again your help is much appreciated. If I can ever return the favor, let me know. Any other ideas?

    Private Sub Command5_Click()
    Dim oMap As MapPoint.MAP
    Dim mysite As String
    mysite = Me![CASCADE]
    Dim oLoc As MapPoint.Location

    Set oMap = GetObject(, "MapPoint.Application").ActiveMap
    oMap.Application.Units = geoMiles
    Set oLoc = oMap.GetLocation(Me![LAT], Me![LONG], 1)
    oMap.AddPushpin oLoc, mysite

    oLoc.Goto

    With MappointControl6.ActiveMap 'fails here as .activemap is not listed
    .Location = .GetLocation(Me![LAT], Me![LONG])
    .Altitude = 1
    End With
    End With

  4. #4
    Paul Larson is offline Senior Member Green Belt
    Join Date
    Sep 2005
    Location
    Battle Creek, Michigan
    Posts
    136

    Re: Mappoint and Access with ActiveX On A Form

    Send me an email and I'll reply with a working demo in an Access2003 database.

    My email is "plarsonpma(AT)hotmail(DOT)com"

  5. #5
    jpateusa is offline Junior Member White Belt
    Join Date
    Jan 2007
    Posts
    4

    Re: Mappoint and Access with ActiveX On A Form

    Paul, once again you came through. Problem solved. If anyone reads this and wants to know how to make Mappoint work in a MS access form, email me and I will share the knowledge Paul was kind enough to share with me. Thanks again!

  6. #6
    hgriffin23 is offline Junior Member White Belt
    Join Date
    May 2009
    Posts
    2

    Re: Mappoint and Access with ActiveX On A Form

    I am trying to do something similar, but I cannot get as far as getting the map to show on the form at all. My e-Mail is gustav23@fuse.net

    Gratefully
    Harold

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem using PopUp property in Access Form
    By PMACAFEE in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 11-12-2006, 10:45 PM
  2. mapPoint 2006 activex control slow down form closing
    By bule in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-26-2006, 02:22 PM
  3. summary to access form help please
    By nmilne in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-15-2006, 04:22 PM
  4. MS Access Mappoint ActiveX
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-21-2005, 06:31 PM
  5. MS Access and Mappoint ActiveX Control
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-26-2004, 02:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96