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!

Trigger AfterUpdate event of combo from another form?

Status
Not open for further replies.

joel009

Programmer
Jul 7, 2000
272
US
Hi,
I have a form with a combo box that controls the results in a tab control with 4 tabs. In the AfterUpdate event of the combo box I am able to correctly display information in the 4 tabs. On this form I have a button to modify records which brings up another form. Upon a successful mod I want to return to the original form and have the Route from the modified record displayed in the combo box and the tabs to be on the 'same page' as the combo box.

Problem - when I assign a value to the combo box from another form the AfterUpdate event is not being triggered, kinda surprised me but that is pretty easy.

This works to get the combo box refreshed and diplaying the correct value and I expected changing the value in the combo box to trigger the AfterUpdate event but it doesn't.

DoCmd.Close acForm, "frmPartRouteReassignment"
Forms![frmBaseRouteAssignment]!cmbRoute.Requery
Forms![frmBaseRouteAssignment]!cmbRoute = strNewRoute

frmBaseRouteAssignment is invisible (but that shouldn't cause it?)

the unload event of frmPartRouteReassignment:
Forms!frmBaseRouteAssignment.Visible = True
Forms![frmBaseRouteAssignment]![subfrmRouteEfficiencyDetail].SetFocus

Any ideas why the AfterUpdate event is not firing?

Thanks in advance!!

Joel
 
Any ideas why the AfterUpdate event is not firing
This is standard behaviour when the value is changed by code.

A workaround is to put the code in the AfterUpdate event procedure in a sub you call in the event and whenever you change the value in your code.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV - sometimes I feel like a newbie with tunnel vision - Thanks

Joel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top