On a Master Form with a listbox (lst_id_wells) - if the value of a well is passed into a custom function ROW_Required_For_Well - it turns a colored box on or off. This just gives a visable indicator to the user as they scroll down a list box - if that Well has a ROW or not.
This form stays open, another form opens. It displays a list of ROW. If a user chooses a different ROW, it updates that form's ROW and it updates the Master Form's list box ROW (the list_id_Wells value is correctly highlighted).
Problem - The code below won't fire in any event that on the Master Form. So, when closing the secondary form, the Master Form list box has a Well selected that won't hight-light the ROW.
Tried the Master Forms's Got Focus, Resize, and so on.
The secondary form changes the Master Form lst_Id_Wells value with the code:
Forms![home_2]![lst_id_wells] = Me.ID_Wells
The code above highlights the correct item in the listbox,
But, changing the value from another form does not trigger the AfterUpdate (or any other event) to run the function.
Private Sub lst_id_wells_AfterUpdate()
10 On Error Resume Next
20 If Not IsNull(Me!lst_id_wells) Then
30 If ROW_Required_For_Well(Me!lst_id_wells) Then
40 Me.BoxRowIndicator.Visible = True
60 Me.BoxRowIndicator.Visible = False
70 End If
80 End If