I've build an App in Access 2007 with MapWinGis ocx 4.92 (windows 7 64 bit). For the Moment I just use the Form to show tiles from various Providers. I can make changes in code and save them, but in the end access always crashes, especially when I close the form or Access. This is the complete code I use at form load:
Private Sub Form_Load()
Dim eXTent As New MapWinGIS.Extents
eXTent.SetBounds 1020000, 7023000, 0, 1220000, 7140000, 0
Map1.CursorMode = 2 'Pan
Map1.SendMouseDown = True
Map1.SendMouseMove = False
Map1.SendSelectBoxFinal = False
Map1.ProjectionMismatchBehavior = tkMismatchBehavior.mbCheckStrictAndReproject
Map1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR
Map1.Tileprovider = tkTileProvider.GoogleMaps
Map1.Extents = eXTent
Can anyone tell me why the program crashes?
Does the new OCX no longer work with Access and VBA?
Thanks for any help
Comments: ** Comment from web user: jacksonmacd **
Private Sub Form_Load()
Dim eXTent As New MapWinGIS.Extents
eXTent.SetBounds 1020000, 7023000, 0, 1220000, 7140000, 0
Map1.CursorMode = 2 'Pan
Map1.SendMouseDown = True
Map1.SendMouseMove = False
Map1.SendSelectBoxFinal = False
Map1.ProjectionMismatchBehavior = tkMismatchBehavior.mbCheckStrictAndReproject
Map1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR
Map1.Tileprovider = tkTileProvider.GoogleMaps
Map1.Extents = eXTent
Can anyone tell me why the program crashes?
Does the new OCX no longer work with Access and VBA?
Thanks for any help
Comments: ** Comment from web user: jacksonmacd **
Just re-discovered MapWinGIS after about 2-3 years hiatus. Very impressed so far.
Initial testing was with MSAccess 2003 and 2010 - very simple form with a map control that displays a tile. I have found that Access always crashes after:
- open a form in design mode
- modify and save the form
- close the form ==> crash Access.
On the other hand, opening the form in display mode does not cause Access to crash. It's obviously not ideal to have it crash every time when designing the form, but it's workable in the short run.
I have a personal project that needs the ability to create shapefiles from MSAccess data, so the MapWinGIS control is very appealing to me. May have to resurrect so code that I wrote for the day-job a long time ago.