|
-
Feb 18th, 2006, 10:43 AM
#1
Thread Starter
New Member
How Do I popluate a Listbox with Data?
Hi all, I need help populating a listbox with data from a database. what I'm trying to do is make a list box that shows all records with the "Date" field along with the FName and LName fields.. it's a project for a class, and it's a Dr. office program that keeps patient records.. I want to have it display all appointments for a single person. i have no code.. but all i can think of is binding it to the ADODC control on the form but that dont work.
-
Feb 18th, 2006, 11:30 AM
#2
Re: How Do I popluate a Listbox with Data?
If its for a class your tutor should of given you some help? Anway there is a great tutorial about this here:
http://www.vbforums.com/showthread.p...t=ado+tutorial
-
Feb 18th, 2006, 11:35 AM
#3
Thread Starter
New Member
Re: How Do I popluate a Listbox with Data?
yeah... I read the tutorial.. I'm just trying to figure out how to populate the listbox..with the 3 fields i want based on the ID number field in the same table. so when i have a particular record visible on the form.. it shows all the different entried of the fields for the same person.. like a appointment history should.
-
Feb 18th, 2006, 12:54 PM
#4
Re: How Do I popluate a Listbox with Data?
First, a listbox is not real good for anything more than one field (and before everyone jumps all over me for saying that, you all know as well as I that to extract something from a listbox that contains more than one entry on a single line requires string parsing, and do we really want to get into that here?)
I would suggest using a ListView rather than a Listbox. Is a Listbox a requirement of your class?
-
Feb 18th, 2006, 02:27 PM
#5
Fanatic Member
Re: How Do I popluate a Listbox with Data?
In either case you need to call a stored procedure to populate the listbox or the listiview. look in my thread the vb nightmare above it cover with the help of the fine people here how to populate a listview several of them actually on a tab dialog control.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|