Dear Sue and Roy
I didn't see the orginal question, but wonder if the following is yet
another approach.
Run an SQL that selects all objects where value = "S" into tabS. Select
all where value="T" into tabT. In layer control remove your original
layer but add in both queries, tabS and tabT. Now label each one as
desired. This approach would allow you to have as many "if conditions"
as you liked.
The result could be saved in a workspace, so that each time the
workspace was opened the SQL(s) would be built again.
Regards
Bob
In message <[EMAIL PROTECTED]>, Sue Port
<[EMAIL PROTECTED]> writes
>Roy,
>
>It's not possible to add "if" statements in the label expression, however
>sometimes
>you can rearrange the expression to have the same effect. For example, your
>case can be expressed as
>
>Chr$(Abs(Sgn(Asc(UCase$(Name))-84))*5+83)
>
>The column data is converted to upper case and to an ASCII code, 84 is minused
>from it giving 0 if it is "T" or "t". Then the Sgn returns either -1,0,1
>depending
>if it's negative,0 or positive. The absolute value is obtained in case there
>are negatives. So now there can only be 0 if there is "T" in the column or 1
>if there is anything else. This is then multiplied by 5 (the different in ASCII
>value between "S" and "X") and then 83 (ASCII value of "S") is added to it.
>Then finally the value is converted back to a character value.
>
>I must admit it, if you could have "if" statement it would make it easier!
>
>Hope this helps.
>
>Regards,
>Sue.
>
>
> adding Susan Port
> value Technical Support Coordinator
> to [EMAIL PROTECTED]
> your
>spatial Spatial Plus
>systems http://www.spatialplus.com
>
>
>>
>>Is there a way to have an "If...Then..Else" statement in a label
>>expression???
>>For example:
>>
>>If columnA ="T" Then
>> Label = "X"
>>Else
>> Label ="S"
>>End IF
>>
>>
>>
>>Thanks...Roy
>>
>>--
>>To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
>>"unsubscribe MAPINFO-L" in the message body, or contact [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]
--
Bob Young
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]