Hi Steve

You just have to use the SelectionInfo function in MapBasic.

If SelectionInfo(SEL_INFO_NROWS) returns zero then nothing is selected.

Remember to include "MapBasic.def" into your .mb  file to get the
"SEL_INFO_NROWS" to work or else use SelectionInfo(3) instead.

Regards

Thomas Brix Lyng
Frederikshavn Munincipal Administration
Denmark


-----Oprindelig meddelelse-----
Fra: Morrier, Steve [mailto:Steve.Morrier@;xwave.com]
Sendt: 6. november 2002 21:45
Til: Lista MapInfo Ingles
Emne: MI-L Check Selection


Hi All,

What is the simplest way in MapBasic to run a quick check to see if anything
has been selected in a table? I want to run a quick routine which works fine
but if I don't have anything selected and I hit the button to run the
routine/MBX the whole thing craps out. Do I need a check or just an OnError
command? I was thinking something like;

If Selection = true then

Run MBX

Else 

Note "Nothing Selected"

I am just having trouble coming up with the correct syntax. TIA

Steve


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3964

Reply via email to