G Guest May 21, 2004 #1 I have a combo box control with 2 columns. How can I reference to the columns? Is it the same as list box? Appreciate someone can show me the codes. Thanks.
I have a combo box control with 2 columns. How can I reference to the columns? Is it the same as list box? Appreciate someone can show me the codes. Thanks.
V Van T. Dinh May 21, 2004 #2 Check Access VB Help on the Column() Property of the ListBox / ComboBox. Note that both Columns & Rows are zero-indexed so if you want the first Column in the first row, you need to use: Me.ComboBox.Column(0,0) -- HTH Van T. Dinh MVP (Access) Chris said: I have a combo box control with 2 columns. How can I reference to the Click to expand... columns? Is it the same as list box? Appreciate someone can show me the codes. Thanks.
Check Access VB Help on the Column() Property of the ListBox / ComboBox. Note that both Columns & Rows are zero-indexed so if you want the first Column in the first row, you need to use: Me.ComboBox.Column(0,0) -- HTH Van T. Dinh MVP (Access) Chris said: I have a combo box control with 2 columns. How can I reference to the Click to expand... columns? Is it the same as list box? Appreciate someone can show me the codes. Thanks.
G Guest May 21, 2004 #3 Thanks. I got the run-time error "424" Object Required at 4th line. Any hint? Here is my code Do Until rst1.EO Debug.Print rst1!VendorID, rst1!VendorNam col1 = Do Until col1 > Me.VendorID.Column(col1, row1) = rst1!VendorI col1 = col1 + Me.VendorID.Column(col1, row1) = rst1!VendorNam Loo rst1.MoveNex row1 = row1 + Loop
Thanks. I got the run-time error "424" Object Required at 4th line. Any hint? Here is my code Do Until rst1.EO Debug.Print rst1!VendorID, rst1!VendorNam col1 = Do Until col1 > Me.VendorID.Column(col1, row1) = rst1!VendorI col1 = col1 + Me.VendorID.Column(col1, row1) = rst1!VendorNam Loo rst1.MoveNex row1 = row1 + Loop
D Douglas J. Steele May 21, 2004 #4 Combo boxes (and list boxes, for that matter) are read-only: you can't update them like that.