Check the activate event. There are some instances where that event doesn't fire.
I sometimes use a procedure like the ones below.
the first, ReQListBoxes, will iterate through the controls on the supplied form and requery any listboxes. It will also identify subforms and iterate through its controls.
I usually call it from the data entry forms OnClose event. you'd call it like - Call ReQListBoxes(forms("YourFormName"))
the NullValue argument is true/false depending whether you want to also clear any selections
the 2nd procedure, RequeryAllLists, will iterate through the forms collection and if the form is open will call ReQListBoxes for each form
Code:
Public Sub ReQListBoxes(frm As Form, Optional NullValue As Boolean)
Dim ctl As Control
Dim ctl2 As Control
For Each ctl In frm.Controls
If ctl.ControlType = acListBox Then
If NullValue = True Then
ctl.Value = Null
End If
ctl.Requery
End If
If ctl.ControlType = acSubform Then
For Each ctl2 In ctl.Form.Controls
If ctl2.ControlType = acListBox Then
If NullValue = True Then
ctl.Value = Null
End If
ctl2.Requery
End If
Next
End If
Next
End Sub
Code:
Public Sub RequeryAllLists()
Dim frm As Variant
Dim f As Access.Form
For Each frm In CurrentProject.AllForms
If frm.IsLoaded Then
'Debug.Print Frm.Name
Call ReQListBoxes(Forms(frm.Name), False)
End If
Next
End Sub
HTH