473,473 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Create Mapinfo's Thematic Maps Or Shade with Access/VBA

14 New Member
Hi all,

I am new in MapInfo. I can open *.TAB within Access/VBA. The next step is to try build a thematic map (Shade) programmatically based on *.TAB information.

I don't have any idea where to start. Could anybody shares a sample code or method to accomplish this.

Thank you in advance.

Yus2Aces
Sep 13 '12 #1
2 3129
zmbd
5,501 Recognized Expert Moderator Expert
Yus2Aces,
What have you tried so far?
Access really isn't a map making/graphic software so it may not be suitable for your application. Perhaps you can provide alot more information and the code you've already tried?
Sep 13 '12 #2
yus2aces
14 New Member
Access is only to display the map (*.TAB) from Mapinfo. And by using Mapbasic command I want to automate shade the map based on one field within the mapinfo's table.

I have gather the Mapbasic command, which I have no clue to write it in VBA.

Expand|Select|Wrap|Line Numbers
  1. shade 1 with Thn_Tnm ignore "" values 
  2.   "1995" Brush (2,16752800,16777215) ,
  3.   "1996" Brush (2,16777104,16777215) ,
  4.   "1997" Brush (2,16749680,16777215) ,
  5.   "1998" Brush (2,7381247,16777215) ,
  6.   "2003" Brush (2,16744640,16777215) ,
  7.   "2004" Brush (2,11796288,16777215) ,
  8.   "2005" Brush (2,61680,16777215) ,
  9.   "2009" Brush (2,16760832,16777215) ,
  10.   "2010" Brush (2,53352,16777215) ,
  11.   "Empl" Brush (2,10543359,16777215) ,
  12.   "Encl" Brush (2,16752848,16777215) ,
  13.   "PKS" Brush (2,10551295,16777215) 
  14.   default Brush (2,0,16777215)   # color 1 # 
The above code will shade the map (thematic map) based on plant's planting year with each brush code define the forecolor and backcolor.

What I am confuse is how to select and grouping the year from the table and inform the mapinfo to shade based on them. I have prepare the identical temp table in Access to try to group them.

Also think to build a ready-made workspace from mapinfo, so I can easily use from within VBA. But I am stuck, because I can't make the workspace works in VBA by using this code.

Expand|Select|Wrap|Line Numbers
  1. Sub Form_Load
  2.  
  3. Dim mi as object
  4.  
  5. Set MIObject = CreateObject("mapinfo.application")
  6. MIObject.do "Set Application Window " & Me.hwnd
  7. MIObject.do "Set Next Document Parent " & Form_frmMapInfo.Controls!DisplayMap.Form.hwnd & " Style 1"
  8. MIObject.do "Run Application """ & CurrentProject.Path & "\world.wor""""
  9. MIObject.runmenucommand 1702
  10. wnd = MIObject.Eval("FrontWindow()")
  11. MIObject.do "Set Window " & str$(wnd) & " Min"
  12. MIObject.do "Set Window " & str$(wnd) & " Max"
  13. MIObject.do "Set Window " & str$(wnd) & " ScrollBars On"
  14. MIObject.do "Create Menu ""Mapper Shortcut"" ID 17 As ""(-"" "
  15.  
  16. End Sub
Or maybe someone have another working method?
Sep 13 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Peter Phelps | last post by:
My problem is as follows: I need automatically iterate through a single field in a table and use the values in the field to create an in-statement. Currently, the character limitation in the...
6
by: WindAndWaves | last post by:
Hi guys Thank you for all your previous answers. My new question is as follows: how do I create a folder/file browser in access 2003. That is, I would like the user to locate several files...
9
by: Albretch | last post by:
.. I am trying to create a database in a MS Access DB via JDBC drivers. I have tried both sun.jdbc.odbc.JdbcOdbcDriver and ids.sql.IDSDriver From some reason both drivers Exceptions tell me...
1
by: kathyk | last post by:
Hi, I created an application in MS Access 2000. Since upgrading to MS Access 2003 I have been finding all sorts of strange things. My current problem is with the function below. Ig get an error...
0
by: Qajussi | last post by:
Hi! I am trying to create data entry forms like MS access forms using asp.net. I am talking about a form like MS access forms which let you enter a new record, edit, navigate to previous and next...
1
by: pat | last post by:
I know this is a long shot, but is there any way of dumping a bunch of SQL "create table" statements from an existing Access 2003 database, to say for example, convert the database to MySQL/Oracle....
4
by: Chris | last post by:
How do we create digitally signed MDE files in Access 2007 ? I tried to follow the procedure I was using in other office versions. 1. I installed the Verisign certificate (with private key)....
1
by: noorulahilah | last post by:
How can i create the table through coding in access? And how can i connect with vb. Suppose "db" is database variable. "stu1" is already existing table name. Now i want to create table "stu2"...
2
by: shireen Eason | last post by:
How to create a text output file from access database?
1
by: vivek samantray | last post by:
I have a query.When i try to create a index on one of the table the index gets created but when i take the output it stuill shows "TABLE ACCESS FULL" Please see below what i did QUERY ======...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.