I have list box on a form that is used as an index. When the user selects a work order number from the list, that work order is displayed. I have tried to set it up so the list box is updated when a new work order is added. What happens is the the work order does not show up until after a second work order is entered, so there is a lag in the updating. The code for pulling up the record from the list box is:
Sub List78_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[WorkOrder] = " & Me![List78]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
And the code I'm using to update the list is:
Private Sub PlantNumber_AfterUpdate()
DoCmd.Save acForm, "frmAlertForm"
Me.List78.Requery
End Sub
I tried saving the form just to see if it would work, I got the same result.
Sub List78_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[WorkOrder] = " & Me![List78]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
And the code I'm using to update the list is:
Private Sub PlantNumber_AfterUpdate()
DoCmd.Save acForm, "frmAlertForm"
Me.List78.Requery
End Sub
I tried saving the form just to see if it would work, I got the same result.