I have a form with 10 listboxes, lstDetails1...lstDetails10. I would like to fill each one with different dynamic data.
I could write 10 procedures to
1. open a database
2. select records
3. loop through and fill the list boxes
I would like to write a function and pass parameters including the listbox name to be filled along with the sql statement to get the data.
The sql part is easy but I cannot figure how to refernce a listbox from a variable.
this is what I want to do
function filllistbox(listboxname, sqlstring)
listboxname.additem "abcdef etc."
"listboxname" is a variable containing the name of the listbox.