Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access records into VB6

Status
Not open for further replies.

biggvito

Technical User
Oct 22, 2001
14
GB
I am connecting an microsoft access table into my form. I want to be able to have all the records in my table to be displayed on my form by putting them in either a list, or more preferably into many labels on my form. How can i do this so for instance if i have 3 records in my table, then all data held in each 3 will be displayed on my labels or list. I do not want a data control to move through records. I just want all records to be displayed.

I have tried but cant do it.

Can anyone please help?
 
You're probably going to need to bind the display somehow unless your table is going to remain very very small, so you probably will want a data control or a recordset that you will fill, in the code. A data control allows you to bind the display labels to the data control's fields, so you don't have to worry about filling them everytime the user goes from one record to the next. If you fill a recordset with the 3 records, you then have to copy the information into the fields, and upkeep the display yourself.

If the table IS very very small, you can get a recordset of the information, and then "fill" a grid or listbox on the screen by adding (additem) a row or element for each item. Then you close the recordset. This displays them, but for editing, you just have to go get 'em again. More info on what end result will be would help.
 
I used the VB aplication Wizzard in VB 6.0 to get me started
use ado code for best results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top