Full Version: Clear unbound listbox
UtterAccess Forums > Microsoft® Access > Access Forms
kentlister
I have a list box on a form that is user populated from another list box. When the record changes I would like the list box to clear instead of displaying the values selected for the previous record.
michaela4
Have you tried requerying the list box on the OnCurrent property of the form?
e.listbox Name.requery
Michael
kentlister
Yes, I have tried to requery, but it doesn't see the list box values so they remain. I have tried, in SQL, to set the row source type to "list Value" then looping through to remove and reset the listbox.value = "Table/Query" but it didn't work.
kentlister
Can't be done?
Fletch
Setting the list box's RowSource property to the empty string ("") should clear all contents from the list box. Is that what you're asking? frown.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.