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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Are there any events which trigger when a calculated field changes?

Status
Not open for further replies.

RYankowitz

Programmer
Jun 13, 2000
27
I have a need to perform some actions when the value in a calculated field changes.&nbsp;&nbsp;As far as I can tell, none of the usual suspects (Change, BeforeUpdate, AfterUpdate, etc.) will fire as a result of a change to a calculated field.<br><br>Normally, this wouldn't be a problem, as the field which is changed by the user (which in turn cause the calculated field's value to change) could trigger the event.&nbsp;&nbsp;But...<br><br>...that field is contained in a sub-form.&nbsp;&nbsp;This complicates things.&nbsp;&nbsp;The only event I've been able to use is the Exit event for the sub-form.&nbsp;&nbsp;That brings me grief because it prevents the user from moving the main form from record to record, unless he clicks outside the sub-form.<br><br>I cannot (or don't want to) use the Current event, as it triggers only upon entering a new record.&nbsp;&nbsp;I need the actions to occur immediately upon changing the calculated field, so as to give immediate feedback to the user.<br><br>BTW, I'm using Access 2000.<br><br>Ideas?&nbsp;&nbsp;Thanks...
 
I need to know a couple of things first.<br>Is the subform Linked to the main form with a Child/Master?<br>At what point do the values recalulate?<br>How do the values recalulate? <br>Where is the formula? In an unbound text box? A bound text box?<br><br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Subform is linked Child/Master.<br><br>The calculation occurs after a record in the subform is completed.<br><br>The form is calculated automatically by Access.&nbsp;&nbsp;There is a hidden total field (TotalPayments) in the subform which is referenced on the main form.&nbsp;&nbsp;The calculated field takes the hidden form's value and adds in a few more fields' values (TotalPayments-Deposit+Tax+Freight).<br><br>The formula is in the calculated field - an unbound text box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top