Hello
I'm trying to update a lstbox after adding an entry to it through a textbox. I suppose it works like I add make an entry to the textbox that goes to a table. The listbox shows records from the table from it's RowSource. I hope that made sense. It will show the update if I leave the form and come back but not immediately. Someone suggested using a Requery. I tried using a Requery in the textbox afterUpdate, beforeUpdate...
but no change to listbox contents until I leave the form and come back again.
Duane
I'm trying to update a lstbox after adding an entry to it through a textbox. I suppose it works like I add make an entry to the textbox that goes to a table. The listbox shows records from the table from it's RowSource. I hope that made sense. It will show the update if I leave the form and come back but not immediately. Someone suggested using a Requery. I tried using a Requery in the textbox afterUpdate, beforeUpdate...
Code:
Private Sub txtAddEmployee_AfterUpdate()
Dim ctxt As Control
Dim ctlst As Control
Set ctlst = lstEmployees
ctlst.Requery ' refresh lstEmployees
End Sub
Duane