Hello Steve,
Friday, June 14, 2002, 11:40:00 AM, you wrote:
MS> Hi All,
MS> I am trying to write a little If..Then statement that first checks if a
MS> table is open, then runs a query on the table. The problem I am having is
MS> when no records are selected. What is the syntax for saying something along
MS> the lines of;
MS> If No records selected then
MS> resume next --- or---- continue
MS> If IsTableOpen("Street_City") Then
MS> Select * from Street_City where Len(Primary) > 20 into Selection
MS> IF NO SELECTION THEN??????
MS> ELSE
Try this:
If TableInfo(Selection, TAB_INFO_NROWS) = 0 Then
'bla-bla-bla
Else If
'bla-bla-bla
End If
MS> browse * from Selection
MS> Note "The Primary Name is more than 20 Characters" + chr$(13) + chr$(13) +
MS> "Please Use a New Primary"
MS> gsOpenTab = "Street_city"
MS> end if
MS> Exit Sub
MS> I am just running a query to alert the user if the data in a column is not
MS> in the correct format. If nothing is selected how can I just continue with
MS> the program??
MS> TIA
MS> Steve.
--
Best regards,
Vladimir Lashin
microOLAP Technologies LLC
MBX/VCL free stuff - http://www.microolap.com/gis/mbx/index.htm
MBBuilder - Visual Development Tool for MapBasic - http://www.microolap.com/gis/mb.htm
Raster Handler for ERDAS Imagine to MapInfo - http://www.microolap.com/gis/imgrhl.htm
MapInfo Callbacks Manager ActiveX - http://www.microolap.com/gis/micm.htm
mailto:[EMAIL PROTECTED]
http://www.microolap.com/gis/ - GIS related products
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]