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!

AfterUpdate event won't trigger Why? 1

Status
Not open for further replies.

wcamny

Programmer
Jul 16, 2001
2
US
this is the some code i wrote on a whole bunch of controls, each call a sub at the afterUpdate event.
but the only one that actually works is the first one(cbmDyn1), the rest just don't trigger the afterUpdate event
please help if you could.

Private Sub cmbDyn1_AfterUpdate()
Call curInsAmm
End Sub

Private Sub cmbDyn2_AfterUpdate()
Call curInsAmm
End Sub


Private Sub cmbDyn3_AfterUpdate()
Call curInsAmm
End Sub

Private Sub txtExpenses1_AfterUpdate()
Call curInsAmm
End Sub


Private Sub txtExpenses2_AfterUpdate()
Call curInsAmm
End Sub


Private Sub txtExpenses3_AfterUpdate()
Call curInsAmm
End Sub
 
What's the code for the function, is it in a module or in the code for the form? What's the code supposed to do? If you modify a control in code, the AfterUpdate event does not fire, do you know that? The user has to touch the control in order for that to work. You can use the Change event if you need to run something anytime a control changes (by user or code).

HTH Joe Miller
joe.miller@flotech.net
 
Thanx Joe
the code is in the form module.
the function takes the ammount in a textBox and divides it by 4. and every time i change the ammount i want to update the original ammount by minusing the origingal ammount with the expense and then divide it again by 4.

when I first wrorte or when i modify the code, all the updateEvents trigger as it should. the problem is when i close and save the form and then reopen it it just would'nt trigger. only the first (cmbdyn1) and the last one (txtexpenses3) actually triger the AfterUpdate event.

I did't modify any of the controls in code. I only changed the value of some text boxes.

Thanx again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top