Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 7th, 2005, 10:58 AM
Bato Bato is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 52 Bato User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 28 m 15 sec
Reputation Power: 5
Question how to show table data in combo box

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

Reply With Quote
  #2  
Old April 7th, 2005, 07:19 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 32 m 23 sec
Reputation Power: 180
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

Reply With Quote
  #3  
Old April 8th, 2005, 03:05 AM
Bato Bato is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 52 Bato User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 28 m 15 sec
Reputation Power: 5
Question how to populate combo box from table records

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?

Reply With Quote
  #4  
Old April 8th, 2005, 04:02 AM
proaos_cyrix proaos_cyrix is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 proaos_cyrix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 22 sec
Reputation Power: 0
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

Reply With Quote
  #5  
Old April 8th, 2005, 06:24 AM
Bato Bato is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 52 Bato User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 28 m 15 sec
Reputation Power: 5
Question

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

Reply With Quote
  #6  
Old April 8th, 2005, 10:07 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 32 m 23 sec
Reputation Power: 180
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.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > how to show table data in combo box


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway