PDA

View Full Version : Listbox query



avadhutd2
01-25-2010, 02:42 AM
Hi ......I am having a userform where I had list of columns from database. [e.g col1, col2, col3...etc]

I am having these column names available in a listbox in a userform...say ListBox1. There is another ListBox2 which is for display purpose.

What I need is when I click on the item in ListBox1, I should be able to populate some information in ListBox2.

I am having a SQL query that get the information in a recordset and then I can assign that record set to the ListBox2.

Can any one give some inputs as how this can be assigned to ListBox2?
If there is any alternate way or in case any one have any sample code it will be helpful.

Thanks in advance!

Bob Phillips
01-25-2010, 05:50 AM
Use GetRows on the recordset to move the recordset to an array, then load that array into the Listbox.