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

AfterUpdate events on the field do not gets activated

Status
Not open for further replies.

maupiti

Programmer
Oct 27, 2003
240
US
AfterUpdate events on the field do not gets activated

Access 2003

I have two forms.

main form name: Incident_Report
subform name : Parts_subform

unbounded text box : subtotal
Control Source:=[Parts_Subform].[Form]![Part_Price_Subtotal]
location : resided on form Incident_Report

The [Parts_Subform] has the following fields
Example:
Quantity Price Total_Amount
2 10.00 20.00
2 20.00 40.00


When either the price or the quantity changes, the
Total_Amount also changes. Then the text box subtotal has
a value of $60.00. This unbounded text box has an event
below to where when the value changes, that change will
be put into a bounded text box named Part_Cost.
However, Part_Cost do not gets updated when subtotal
value has changed.

Private Sub Subtotal_AfterUpdate()
Forms!Incident_Report!Part_Cost = Forms!Incident_Report!Part_Cost!subtotal
End Sub

I also use the 'on change' events, but it does not work.
I also use the 'on dirty' events, but it does not work.

 
When a field is updated programmatically, events do not fire. I think you must go back a step to where you are updating subtotal.
 
Hi Remou, and thank you for your help.
What do you suggest I should do to update the
bounded field Part_Cost whenever the field Subtotal
value is changed ?
 
Hi maupiti
You say "When either the price or the quantity changes, the Total_Amount also changes. Then the text box subtotal has a value of $60.00."

What is the code that changes the Total Amount? It is in that procedure that you need to add code currently in the subtotal After Update procedure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top