| Subject |
Calculated Field Question |
| From |
Norman Snowden <duluth@msn.com> |
| Date |
Sun, 27 Nov 2022 23:29:19 -0500 |
| Newsgroups |
dbase.getting-started |
I am trying to transfer and use the values of calculated fields ftpmt and stpmt which are generated in pushbutton1 for use in pushbutto2. The values check out OK at the end of pushbutton1, but at the beginning of pushbutton2 the values should be 997.95 and 0 but are an extraneous 5.11 and an inverted 997.95. The ftpmt and stpmt entryfields are included in the Table and data linked.
The calculated fields are not shown as rows in the Table and apparently cannot be saved as I tried. They are shown on the Form as non enabled entryfields.
I even tried Using m->ftpmt and m->stpmt stored as public variables temftpmt and temstprt in pushbotton1 to be retrieved for pushbutton2. This did not work, the results printed out a 0 0.
End of Pushbutton1
? m->ftpmt, m->stpmt
form.lqactsch1.rowset.fields["ftpmt"].value = m->ftpmt
form.lqactsch1.rowset.SAVE()
form.lqactsch1.rowset.fields["stpmt"].value = m->stpmt
form.lqactsch1.rowset.SAVE()
temftpmt = m->ftpmt
temstpmt = m->stpmt
RETURN
Begin Pushbutton2
Clear
? form.lqactsch1.rowset.fields["ftpmt"].value
? form.lqactsch1.rowset.fields["stpmt"].value
m->ftpmt = temftpmt
m->stpmt = temstpmt
? m->ftpmt, m->stpmt
? "PPPP"
return
Results after running Pushbutto2
5.10
997.95
0 0
pppp
It is obvious that I do not understand using calculated fields. Any comments would be appreciated. Norman
|
|