Subject Re: Assigning Values
From Andy Taylor <andy.taylor@which.net>
Date Fri, 13 Apr 2018 18:12:27 -0400
Newsgroups dbase.getting-started

Norman,

Unlikely that you've maxxed out on entryfields.
I might be able to suggest a different way of doing what you want... that form must be a monster (drop me an e-mail if you want).

Having looked at your code I think it more likely that the rowset.save() method has not completed (because of the huge number of datalinks)
before you start asking for the replaced values. Incidentally I assume the last three commands are really tard, tarm and tars instead of tard 3 times.

Try using..
form.area1.rowset.save()
do until form.area1.rowset.modified = false
   _app.executemessages()
enddo
? .... etc

Of course that might give you an endless loop if there's a problem with the save... so perhaps a count on the loops with maximum value?
Andy


> This code changes a decimal angle to degrees minutes and seconds. On the Form.wfm the seconds, called tars, prints out  just fine in the tars Entryfield.
>
> However the decimal tard value and the minute tarm value show as zeros in their Entryfields as zero, which they are.
>  
> As you can  see from the printouts tard and tarm refuse to accept their assigned values.
>
> Can the program just be maxed out with too many Entryfields?
>
> Thanks for any comments, Norman Snowden
>
> with (this.ENTRYFIELD428)
>       dataLink = form.area1.rowset.fields["tard"]
>       height = 0.1667
>       left = 10.1458
>       top = 5.375
>       width = 0.34
>       picture = "99"
>       fontSize = 8.0
>       fontBold = true
>    endwith
>
>    this.ENTRYFIELD429 = new ENTRYFIELD(this)
>    with (this.ENTRYFIELD429)
>       dataLink = form.area1.rowset.fields["tarm"]
>       height = 0.1667
>       left = 10.52
>       top = 5.375
>       width = 0.32
>       picture = " 99"
>       fontSize = 8.0
>       fontBold = true
>    endwith
>
>    this.ENTRYFIELD430 = new ENTRYFIELD(this)
>    with (this.ENTRYFIELD430)
>       dataLink = form.area1.rowset.fields["tars"]
>       height = 0.1667
>       left = 10.875
>       top = 5.375
>       width = 0.5833
>       picture = "99.999"
>       fontSize = 8.0
>       fontBold = true
>    endwith
>
>    tcnvr = RTOD(Atan(m->yty/m->xtx))  && 03/16/2017                     
>         m->tard = INT(tcnvr)
>         m->tarm = INT((tcnvr - m->tard) * 60)
>         m->tars = ((((tcnvr - m->tard) * 60) - INT((tcnvr - m->tard) * 60))) * 60
>         ? m->tard, m->tarm, m->tars, "m->tard", "m->tarm", "m->tars"                
>         form.area1.rowset.fields["tard"].value = m->tard
>         form.area1.rowset.fields["tarm"].value = m->tarm
>         form.area1.rowset.fields["tars"].value = m->tars
>         form.area1.rowset.save()
>      ? form.area1.rowset.fields["tard"].value , "tard"
>         ? form.area1.rowset.fields["tard"].value , "tarm"
>         ? form.area1.rowset.fields["tard"].value , "tars"  
>           
>    
>         20         54         18.56681 m->tard m->tarm m->tars
>         0 tard
>         0 tarm
>         18.56700 tars
>    return