Trying to populate a listbox from a query

mcarlin

New member
Local time
Today, 06:09
Joined
Aug 17, 2005
Messages
8
Hi -

I've searched the forms for any solutions/ideas but I'm still not sure.

I want to pass a search parameter from a form to a query then use the query results to populate a multi-column list box. So far, I can pass the parameter to the query and generate results, however, I want the query results sent to a listbox rather than create a new window.

I set up the listbox to receive results from the query, but when the form opens the listbox is already populated with arbitrary query results. I want the listbox to be empty when the form is opened, I submit a parameter to a query, and the listbox fills with the results

Additionally, once the listbox is populated, I want to clear the listbox but am having the error: The RowSourceType property must be set to 'Value List' to use this method.

Thanks in advance!

MC
 
Don't set the RowSource of the ListBox until after you have completed the search parameter. I believe setting the RowSource to "" will clear the ListBox.
 
Thanks very much!
 

Users who are viewing this thread

Back
Top Bottom