Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling a two column listbox from a two column recordset
Is there a way to fill a two column listbox on a userform
from a SQL recordset? I want the user to be able to make multiple selections from this listbox. And then I want to write an update SQL back to a table. Thank you in advance, Dennis |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling a two column listbox from a two column recordset
http://support.microsoft.com/default...61&Product=xlw
XL2000: How to Use ADO to Return Data to a ListBox or ComboBox -- Regards, Tom Ogilvy "Dennis" wrote in message ... Is there a way to fill a two column listbox on a userform from a SQL recordset? I want the user to be able to make multiple selections from this listbox. And then I want to write an update SQL back to a table. Thank you in advance, Dennis |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling a two column listbox from a two column recordset
Tom,
Thank you. However, I'm having trouble with filling the second column. My two fields fill in the first column. Any ideas? Dennis -----Original Message----- http://support.microsoft.com/default.aspx?scid=kb;en- us;244761&Product=xlw XL2000: How to Use ADO to Return Data to a ListBox or ComboBox -- Regards, Tom Ogilvy "Dennis" wrote in message ... Is there a way to fill a two column listbox on a userform from a SQL recordset? I want the user to be able to make multiple selections from this listbox. And then I want to write an update SQL back to a table. Thank you in advance, Dennis . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling a two column listbox from a two column recordset
Do Until rstEmployees.EOF
with UserForm1 .ComboBox1.AddItem rstEmployees!lName .Combobox1.List(.combobox1.Listcount-1,1) = rstEmployees!fName ' To use a ListBox control, use the following statement instead ' of the one above: ' UserForm1.ListBox1.AddItem rstEmployees!lName ' ' If the ComboBox or ListBox is on a worksheet instead of ' a UserForm, reference the worksheet instead of the UserForm: ' ActiveSheet.ComboBox1.AddItem rstEmployees!lName rstEmployees.MoveNext Loop -- Regards, Tom Ogilvy "Dennis" wrote in message ... Tom, Thank you. However, I'm having trouble with filling the second column. My two fields fill in the first column. Any ideas? Dennis -----Original Message----- http://support.microsoft.com/default.aspx?scid=kb;en- us;244761&Product=xlw XL2000: How to Use ADO to Return Data to a ListBox or ComboBox -- Regards, Tom Ogilvy "Dennis" wrote in message ... Is there a way to fill a two column listbox on a userform from a SQL recordset? I want the user to be able to make multiple selections from this listbox. And then I want to write an update SQL back to a table. Thank you in advance, Dennis . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling a two column listbox from a two column recordset
Left out the End With
Do Until rstEmployees.EOF with UserForm1 .ComboBox1.AddItem rstEmployees!lName .Combobox1.List(.combobox1.Listcount-1,1) = rstEmployees!fName End with -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Do Until rstEmployees.EOF with UserForm1 .ComboBox1.AddItem rstEmployees!lName .Combobox1.List(.combobox1.Listcount-1,1) = rstEmployees!fName ' To use a ListBox control, use the following statement instead ' of the one above: ' UserForm1.ListBox1.AddItem rstEmployees!lName ' ' If the ComboBox or ListBox is on a worksheet instead of ' a UserForm, reference the worksheet instead of the UserForm: ' ActiveSheet.ComboBox1.AddItem rstEmployees!lName rstEmployees.MoveNext Loop -- Regards, Tom Ogilvy "Dennis" wrote in message ... Tom, Thank you. However, I'm having trouble with filling the second column. My two fields fill in the first column. Any ideas? Dennis -----Original Message----- http://support.microsoft.com/default.aspx?scid=kb;en- us;244761&Product=xlw XL2000: How to Use ADO to Return Data to a ListBox or ComboBox -- Regards, Tom Ogilvy "Dennis" wrote in message ... Is there a way to fill a two column listbox on a userform from a SQL recordset? I want the user to be able to make multiple selections from this listbox. And then I want to write an update SQL back to a table. Thank you in advance, Dennis . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling a two column listbox from a two column recordset
Tom,
Thank you very much for helping me. I got it to work before your last note. I really do appreciate your quick response - sorry I'm late getting back. Dennis -----Original Message----- Left out the End With Do Until rstEmployees.EOF with UserForm1 .ComboBox1.AddItem rstEmployees!lName .Combobox1.List(.combobox1.Listcount-1,1) = rstEmployees!fName End with -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Do Until rstEmployees.EOF with UserForm1 .ComboBox1.AddItem rstEmployees!lName .Combobox1.List(.combobox1.Listcount-1,1) = rstEmployees!fName ' To use a ListBox control, use the following statement instead ' of the one above: ' UserForm1.ListBox1.AddItem rstEmployees! lName ' ' If the ComboBox or ListBox is on a worksheet instead of ' a UserForm, reference the worksheet instead of the UserForm: ' ActiveSheet.ComboBox1.AddItem rstEmployees! lName rstEmployees.MoveNext Loop -- Regards, Tom Ogilvy "Dennis" wrote in message ... Tom, Thank you. However, I'm having trouble with filling the second column. My two fields fill in the first column. Any ideas? Dennis -----Original Message----- http://support.microsoft.com/default.aspx?scid=kb;en- us;244761&Product=xlw XL2000: How to Use ADO to Return Data to a ListBox or ComboBox -- Regards, Tom Ogilvy "Dennis" wrote in message ... Is there a way to fill a two column listbox on a userform from a SQL recordset? I want the user to be able to make multiple selections from this listbox. And then I want to write an update SQL back to a table. Thank you in advance, Dennis . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
filling a column | New Users to Excel | |||
how to change column references, while filling down another column | Excel Discussion (Misc queries) | |||
Pre-filling column | Excel Discussion (Misc queries) | |||
How to populate a multi-column activeX listbox on a spreadsheet with an ADO recordset | Excel Programming | |||
Filling Column with Numbers | Excel Programming |