Had some help recently to resolve an issue with MW crashing Access 2003, and it appeared to be resolved. Unfortunately, it's returned.
Previous testing was with a very simple A2003 file containing just one form with a Map control. Have now tried MW with an application that I am developing, and that contains numerous other controls. The Map control is contained within an Access Tab control. Here is the Load event for the form that contains the Map control. There is nothing else in the app that pertains to the Map control
Private Sub Form_Load()
Dim gs As New GlobalSettings
gs.ApplicationCallback = New MwCallback
axMap.TileProvider = tkTileProvider.OpenStreetMap
iLayerhandle = axMap.AddLayerFromFilename("d:\\FromDBF.shp", tkFileOpenStrategy.fosAutoDetect, True)
' axMap.Projection = tkMapProjection.PROJECTION_WGS84
End Sub
There is a Class module to define Global settings. The above code works perfectly in my original testing MDB, but when I uncomment the Projection statement, it consistently crashes A2003.
Comments: ** Comment from web user: sleschinski **
Previous testing was with a very simple A2003 file containing just one form with a Map control. Have now tried MW with an application that I am developing, and that contains numerous other controls. The Map control is contained within an Access Tab control. Here is the Load event for the form that contains the Map control. There is nothing else in the app that pertains to the Map control
Private Sub Form_Load()
Dim gs As New GlobalSettings
gs.ApplicationCallback = New MwCallback
axMap.TileProvider = tkTileProvider.OpenStreetMap
iLayerhandle = axMap.AddLayerFromFilename("d:\\FromDBF.shp", tkFileOpenStrategy.fosAutoDetect, True)
' axMap.Projection = tkMapProjection.PROJECTION_WGS84
End Sub
There is a Class module to define Global settings. The above code works perfectly in my original testing MDB, but when I uncomment the Projection statement, it consistently crashes A2003.
Comments: ** Comment from web user: sleschinski **
Jack,
this one is hard to reproduce. I checked your code in C# and MS Access 2013 - no crashes. Please try to change the order of lines, i.e. to set projection before adding shapefile (this is the usual way to do it). Also do you open the same shapefile in your original testing db and production one? Perhaps there are issues with the latter one. If nothing helps, would be good if you provide me sample db to reproduce it (most likely the problem can be narrowed down).
Thanks,
Sergei