Listbox not updating

sumdumgai

Registered User.
Local time
Today, 05:32
Joined
Jul 19, 2007
Messages
453
Hello again. Still learning about forms. Any help is appreciated.


I've followed some YouTube videos on the subject and am trying to create a form with some search boxes and a list box. Without posting my code, I wonder if there is a simple answer to this question:


When I enter the values in the search boxes, the query returns a datasheet view to the screen with the correct records, but the listbox within the form is not updated until I close the form and reopen it, even though I am issuing a 'Requery' command in the 'After Update' event code for the search boxes. Is there a simple answer as to why the listbox is not being immediately updated?


Thanks.
 
Think I figured it out. Included a Me.refresh and a DoCmd.Close at end of After-Update event code. Would that be the correct way to do it?
 
It sounds like you need to requery the listbox. Or if you mean selections aren't cleared, you need to loop it and deselect selected values.
 

Users who are viewing this thread

Back
Top Bottom