I have added an error handler to pick up tables without graphic information when being opened in a map window. The error is picked up and processes okay except that following the Note "....." the MI error message ((module4.mb:72) Table tenure does not have graphic information) appears AS WELL before continuing with the program. What's wrong with my error handling structure?
TIA
Kingsley
The relevant code is as follows:
Sub ....
Open_Graphic_Tables:
Dialog code
If CommandInfo(CMD_INFO_DLG_OK) then
OnError Goto ERRORMESSAGE
count = 1
Do While count <= UBound(data_tables)
Open table "c:\ciap\data\" + Read_Table_Name(data_tables(count))
num_open_windows = NumWindows()
If num_open_windows = 0 then
Map From Read_Table_Name(data_tables(count))
Position ( 2,0.5 ) Units "cm"
Width 10 Units "cm"
Height 12 Units "cm"
Else
Add Map
Layer Read_Table_Name(data_tables(count))
End If
count = count + 1
Loop
OnError Goto 0
ERRORMESSAGE:
error_code = ERR()
If error_code = 318 then
For i = 1 to count
If TableInfo(Read_Table_Name(data_tables(i)),TAB_INFO_MAPPABLE) = 0 then
Note "Table '" + Read_Table_Name(data_tables(i)) + "' does not have graphic information."
End If
Next
Close all
'AROUND THIS POINT THE MI ERROR MESSAGE APPEARS
Goto Open_Graphic_Tables
End If
K Gum
Senior Research Assistant
Australian Housing and Urban Research Institute
Queensland University of Technology
Ph: (07) 3864 1750 Fax: (07) 3864 1827
Email: [EMAIL PROTECTED] ---------------------------------------------------------------------- To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
