Fill listbox from database quickly

I use the SQL IN() command to get just the id’s I need:

[code]Dim tempArray() As String

…delete the listbox contents
…fill up the array with the visible id values
if tempArray.Ubound >= 0 then
rs = db.SQLSelect(“SELECT * from myTABLE where id IN(” + Join(tempArray, “,”) + “)”)
…place the results in the listbox
end if[/code]

If you set the Compiler Optimization Level to “Aggressive” you get a little bit more speed.