Subject Re: Entryfield Valid won't work
From Norman Snowden <duluth@msn.com>
Date Wed, 09 Jan 2019 23:49:14 -0500
Newsgroups dbase.getting-started

Update: I am sorry to have posted about this problem. It is now fixed. I can't understand why. Searching for any solution by a lucky trial I reversed the sequence placing the "S" first as: If this.value = "S" or this.value = "N"
   test = true
Sorry about this. Maybe I need to be a nicer person!  


Norman Snowden Wrote:

> I have 16 character Entryfields  named ns0 through ns16. Each one has a Valid function restricting the value to be only "N" or "S". This has worked fine until recently NS8 and NS10 each now permanently contain "N". When "S" is entered for these two, an Error message: "Invalid Input" occurs.
>
> If I disable the valid function for these two and enter "S" the program works fine. Of course if I advertently enter any other character, say a "V", the program will not work.
>
> If someone has an idea of what could cause this I would appreciate it. I realize not much information is provided. Below is excerpts of my code.
>
> this.ENTRYFIELD87 = new ENTRYFIELD(this)
> with (this.ENTRYFIELD87)
> •        VALID = class::ENTRYFIELD87_VALID
>         datalink = form.area1.rowset.fields[“ns10”]
>          height = 0.1771
>           left = 0.92
>           top = 2.87
>           width = 0.1771
>           function = “!”
>           f ontsize = 8.0
>           fontbold = true
>      endwith    
>
> Function ENTRYFIELD86_valid()                              
> ns9
> Test = false
> If this.value = “N” or this.value = “s”
>        Test = true
> endif
> return test
>
> Function ENTRYFIELD87_valid()
> * ns10
> * Test = false
> * If this.value = “N” or this.value = “s”
> *       Test = true
> *  endif
>   return   && test
>
> Function ENTRYFIELD88_valid()
> •        ns11
> Test = false
> If this.value = “N” or this.value = “s”
>        Test = true
> Endif
> return test
>
>
>
>  
>
>