|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hy,how to show data from table in combo.
I've put on my form ado control connecting to access database and set all properties for combo but when I start application it shows me only one record,and when i click on dropdown ther's nothing,but i can navigate records by navigator button on ado control. How to set combo to show the list of data when i click on dropdown button. Thanks |
|
#2
|
|||
|
|||
|
If you use a data-bound combo like the adodatacombo you set the sql for the list and the datafield in the control properties and the database data will be there without additional coding.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Hy,you sed datacombo and adodatacombo.
I'm not sure whar kind of combo is that.I'm using VB6 and only simple combo that i bound to adodc. I've tried to find combo you mentioned in components but didn't find it. Is that combo available in VB.NET? |
|
#4
|
|||
|
|||
|
Hi there, try this one.
to General (code view) type Dim rs As New ADODB.Recordset to Form (code view) type rs.MoveFirst Do Until rs.EOF = True Then combo1.AddItem rs.Field (0) & "" rs.MoveNext Loop Details rs = represent for your record (0) = represent the field on your database want them to display Hope can help you IT Outsourcing Solutions Offshore Outsourcing Solutions Affordable Web Design High Quality Adult Web Site Design Ecommerce Web Site Design |
|
#5
|
|||
|
|||
|
Hy,thanks for code example but it didn't helped me.
Could you just show me how to do this: If i have one access table with two columns,and i want to show data from that table in my combo how to code this. I put on my form ado data control that i bind to my table in database,and combo that i bind to that ado control. And just how to show those data when i start the form in my dropdown combo.This is probably stupid question but it drives me crazy. When i do this in VBA in Access it goes slighlty,but in VB6 ........uhhh!! Thanks |
|
#6
|
|||
|
|||
|
To get the DataCombo and DataList controls into your toolbox, in project-components add the Microsoft Datalist Controls components. These controls are documented in the VB6 controls reference documentation.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > how to show table data in combo box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|