Community of VE/MapPoint Users and Developers
This is a discussion on Mappoint and Access with ActiveX On A Form within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Mappoint and Access with ActiveX On A Form |
| |||
| 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 |
| |||
| 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 |
| |||
| 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" |
| |||
| 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! |
![]() |
| Tags |
| access, activex, form, mappoint |
| ||||
| Posted By | For | Type | Date | |
| Programming MapPoint in .NET - MP2K Magazine | This thread | Refback | 02-01-2007 05:07 PM | |
| Determing the Time Zone in MapPoint - MapPoint Articles - MP2K Magazine | This thread | Refback | 02-01-2007 03:09 PM | |
| MapPoint Download - MP2K Magazine | This thread | Refback | 01-31-2007 02:52 PM | |
| MapPoint Automation with C/C++ - Part 1 - MapPoint Articles - MP2K Magazine | This thread | Refback | 01-31-2007 04:48 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 01-30-2007 06:19 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem using PopUp property in Access Form | PMACAFEE | MapPoint 2006/2009 Discussion | 4 | 11-12-2006 10:45 PM |
| mapPoint 2006 activex control slow down form closing | bule | MapPoint 2006/2009 Discussion | 1 | 09-26-2006 02:22 PM |
| summary to access form help please | nmilne | MapPoint 2006/2009 Discussion | 3 | 01-15-2006 04:22 PM |
| MS Access Mappoint ActiveX | Anonymous | MapPoint 2006/2009 Discussion | 2 | 05-21-2005 06:31 PM |
| MS Access and Mappoint ActiveX Control | Anonymous | MapPoint 2006/2009 Discussion | 3 | 06-26-2004 02:29 PM |