🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.databases
2 messages
2 total messages Started by TJ Fri, 10 Jul 1998 00:00
Calculating Fields OnChange or OnCalc?
#93
Author: TJ
Date: Fri, 10 Jul 1998 00:00
19 lines
1437 bytes
Is it possible to use a fields OnChange event to calculate a value for
another field?

For example I want to determine the average of four fields and post
the result in a fifth field.  Now everytime I change a value in one of
the four field I want it to recompute and update the fifth field.  

Am I restricted to using the OnCalcFields event or can I simply use
the OnChange event for the four different fields?

Thanks.
********************************************************
Reply To:  redleg7@bigfoot.com or ICQ:  1889495
********************************************************
Project:  Football(Soccer) Management Sim 
Compiler/Language:  Delphi 3
Remarks:  If you are interested in this project drop me 
line or ICQ me.
********************************************************
Re: Calculating Fields OnChange or OnCalc?
#92
Author: Pepsi-Cola
Date: Tue, 14 Jul 1998 00:00
18 lines
1592 bytes
As the user types in numbers, the OnChange will calc your total on each
digit typed in. Probably annoying. Go for OnExit. It will then calc as
soon as the hit Enter, Tab, OK_button, etc. The only time OnExit won't
compute is if they change to a different window, such as alt-tab, etc,
in which case they never really exited the Edit_field on that particular
window. Something I found tolerable, and hardly ever happens.

Dustin

> Is it possible to use a fields OnChange event to calculate a value for
> another field?
> 
> For example I want to determine the average of four fields and post
> the result in a fifth field.  Now everytime I change a value in one of
> the four field I want it to recompute and update the fifth field.
> 
> Am I restricted to using the OnCalcFields event or can I simply use
> the OnChange event for the four different fields?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads