I have a table I want to update if the user moves a point on the map.
After they have moved it and any other points in the table I would like
to have them run the code below to update the table data.
When I run the code I get an error message:
"Main: (MB line number) CentroidX: Could not fetch object from the
current row, argument 1"
I get the same result running it manually in MapInfo.
Any thoughts would be appreciated.
Greg
The Code is:
Sub ColUpdate
If CommandInfo(CMD_INFO_DLG_OK) Then
Select * From TPlots
End If
Do Case i_Colup
Case 1 i_Colup = 1
Update TPlots Set strCol1 = CentroidX(obj)
Update TPlots Set strCol2 = CentroidY(obj)
Case 2 i_Colup = 2
Update TPlots Set strCol1 = CentroidX(obj)
Case 3 i_Colup = 3
Update TPlots Set strCol2 = CentroidY(obj)
End Case
Close Table Selection
End Sub
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 11152