473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Take data from column table and list in a combo box......

How do i take data from a table column example Customer_Name and list it in a combo box in vb6 ?
Aug 16 '07 #1
3 1395
fplesco
82
How do i take data from a table column example Customer_Name and list it in a combo box in vb6 ?
My assumptions are,
1. You are already connected with the database.
2. Rs recordset is available at this point.

All you need is check if there exist at least a record in the recordset Rs

Expand|Select|Wrap|Line Numbers
  1. cboCustomerName.Clear
  2. if not rs.eof then
  3.    do until rs.eof 
  4.         cboCustomerName.addItem Rs!Customer_Name
  5.         rs.movenext
  6.    loop
  7. end if
  8.  
Aug 16 '07 #2
Thanks man ! It works fine......
Aug 17 '07 #3
My assumptions are,
1. You are already connected with the database.
2. Rs recordset is available at this point.

All you need is check if there exist at least a record in the recordset Rs

Expand|Select|Wrap|Line Numbers
  1. cboCustomerName.Clear
  2. if not rs.eof then
  3.    do until rs.eof 
  4.         cboCustomerName.addItem Rs!Customer_Name
  5.         rs.movenext
  6.    loop
  7. end if
  8.  
hi I'm a new member. Just read your reply and Im new in using vb also
just need little help with regards to above problem. I already did the same thing as you send to him but my problem is I also want to display in text box the the customer address of the chosen combo box item which is in the next field of the customer name. Hope you help me thanks.

ronmoana.
Aug 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Nhmiller | last post by:
When I start to type the data for a new record, I would like a dropdown box to open next to it from which I can choose the data from a previously entered record that starts with the same letter....
2
by: Rooksarii | last post by:
Hello folks, Let me first apologize for any impropper terminology I may use as I am presently trying to broaden my Office knowledge by diving into Access head on. My specific problem is this....
13
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture'...
4
by: tlyczko | last post by:
I read about limiting combo boxes' list data, for example, limiting the list of values in the second combo based on values in the first combo, and I found the Dev Ashish site link. I have two...
4
by: pointies | last post by:
I have a form with a ComboBox with a list of users. The ComboBox is set on a Table/Query to look up the Employee Names by their ID. The ComboBox is named AssignedTo If I set up a Textbox with...
1
by: Richard | last post by:
Very typical normal data Table One ------ One.OneID (PK) One.Name One.Description One.TwoID (FK) One.ThreeID (FK) ....
28
by: jverri01 | last post by:
First, I am relatively new to working with variables. Most of my experience has been with interface design. i am using ACCESS ver. 2003, running in Windows XP. Second, I spent an hour searching...
1
by: christianlott1 | last post by:
I want to provide users with an interface to create a custom merge (all in Access, not Word). User will put in a set of brackets ("<>") in a memo field and when they click the merge button it will...
1
by: Maria DiGiano | last post by:
I am using Access to organize data from a survey which uses a Likert scale to measure response- the scale is 3 points- "I agree", "I don't know" and "I disagree". The numerical value of each...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.