Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Window Calculated Field 1

Status
Not open for further replies.

AlanBreck1000

Programmer
Oct 20, 2005
28
US
I have an update form window on which I have fields for amount, percentage and hours and a filed to hold the calculation of (amount*percentage)/100 * hours. This is a formula.

The question is, is there any way to see the calculation prior to exiting the form on the initial entry? Right now it will not calculate until I go back into the form for a second time.

Using Clarion 5 PE
 
Hi Alan,

For the Calculations to be calculated & displayed properly, you need to execute it on every EVENT:Accepted irrespective of the control being accepted. If the calculation are intensive you need to save previous values of the data elements involved in the calculations and re-calculate ONLY if they have changed. If you are using ABC, the WindowManager method to use is TAKEACCEPTED - top of the Accept Loop.

-- your code here

CASE ACCEPTED()
of ?
...
END

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top