MapWinGIS ActiveX Sample Code : MapWindow Discussion Forum
Uploaded to svn: SampleCode/Access2007_Borehole/ This sample code database is meant to share several VBA solutions for using the MapWinGIS Active X component in Access, using a datab
Access 2007 point database with MWG ax map and sample VBA code, uploaded
Posted by: pdv ()
Date: February 15, 2010 12:12AM

Uploaded to svn:
SampleCode/Access2007_Borehole/

This sample code database is meant to share several VBA solutions for using the MapWinGIS Active X component in Access, using a database of borehole point data. Functionality includes displaying any shapefile, generating point shapefiles from the database, handling a number of standard map features such as scale bar, scale drop down, cursor location, map identifier, coloring points according to value, etc.

I had difficulty finding more complete solutions for VBA/Access in the MWG online resources (probably because few people work with VBA). But of course the solutions used in the DB rely on various contributions at the mapwindows.org site in one way or another.

So I hope that this example database might help someone else working with VBA and Access (point data) and starting from scratch with MWG. The coding is amateur, but hey, it works. Commenting of the code is not great, so contact me if you want better.

The icons used for the map buttons are by Robert Szczepanek, [robert.szczepanek.pl]

The borehole data is scrambled wrt location and attributes. A point shapefile has already been generated, and is in \output\SHP, but you can also generate a new one in the map interface. Other user actions:
- toggle layer visibility
- label fields
- color points in relation to limit value
- color points with a color range
- draw or click to select points (map identifier)
- double click in identifier to edit record
- toggle visibility of layers

Designated subfolders with respectively, shape files to display, and shapefile output are included in the svn posting.

I would of course welcome feedback and code improvement suggestions, mail at whitepine.se.

Re: Access 2007 point database with MWG ax map and sample VBA code, uploaded
Posted by: sebastian wolter ()
Date: November 16, 2010 02:57PM

hello

can you please psot this project in a zip file ?
thank you

upload zip
Posted by: pdv ()
Date: April 12, 2011 01:26AM

Zipped is >200 KB, too big to attach here. I think Paul Meems helped to upload to snv before, in any case not sure how to do it now. Mail me I'll send the zip. gmail, paul.devries.wpc

Re: Access 2007 point database with MWG ax map and sample VBA code, uploaded
Posted by: maxlor1958 ()
Date: July 04, 2011 11:03AM

Tried to use the borehole code. Got immediately the error message "There is no object in this control" and the debugger states that the faulty line is

If mapObj Is Nothing Then Set mapObj = Me.mapCtl.Object

at the beginning of the form_load module.
Any help?
Thanks

Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: