Alias varibles require tablename and dot operator, too. Have you provided one? Maybe
try something like this:
dim aColRef as alias
aColRef="MyTable."+ "Ref_No"
--
Sonya Nikolsky
Production Manager
JCH GeoInfo
3600 University Dr
Durham NC 27707
"Eagle, David A" wrote:
> Listers,
>
> In MapBasic I am trying in vain to run an IF statement on a Column of
> reference numbers to return a Note statement. Basically IF the value entered
> by the user does not feature in the column, Note "Invalid Ref, enter
> another!". I keep getting an error: "variable or Field_Ref not defined". Am
> I using an incorrect operand...(?) or defining my variables incorrectly?
>
> Dim sUserValue As String ' Value type into edit text box
> Dim aColRef As Alias ' Column name
>
> aColRef = "Ref_No"
>
> If Val(sUserValue) <> aColRef Then Note "Invalid Scheme Reference,
> enter again"
> Dialog Preserve
>
> Else
> Do Case.......
>
> Any pointers much appreciated.
>
> Best regards, Dave
>
> ----------------------------------------------
> David A. Eagle, GIS Consultant
> WS Atkins Consultants Ltd
> Cornerstone House
> Stafford Park 13
> Telford, TF3 3AZ
> Tel: (01952) 201234
>
> This email and any attached files are confidential and copyright protected.
> If you are not the addressee, any dissemination of this communication is
> strictly prohibited. Unless otherwise expressly agreed in writing, nothing
> stated in this communication shall be legally binding.
>
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.