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

Re-calculate after data is changed

Status
Not open for further replies.

brbarto

Technical User
Sep 6, 2001
34
I have a form where the user enters BeginMileage and
EndMileage. After the EndMileage is entered, the
difference is calculated and entered in a subform control.
How should I handle the fact that the user may change the
BeginMileage. In other words, if the BeginMileage is
changed, I need the difference calculated again.

Thanks,
New to Access
 
In the after update event of the BeginMileage insert code like this (change the names of controls appropriatelly)

Me!SubFormControlName.Form!CalculatedControlName = EndMileage - BeginMileage

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top