>Is there a way to display the results of an array in a listbox if the query selects 0 records. I basically want to show a blank listbox if no records meet the criteria and show all records if any match. The problem is, if the 1st query returned 2 records and the 2nd query returned 0 records the 2 records from the 1st query remain in the listbox instead of blanking it out. Any help would be appreciated.
If the query results in 0 records, DIMENSION the array to have 1 row and however many columns it should have, and make the array empty - e.g.,
select * from rowsourcetable into array thisform.asource
if _tally = 0
dimension this.asource(1,2)
thisform.asource = ""
endif
Insanity: Doing the same thing over and over and expecting different results.