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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 & DAO: List all items in a column...

Status
Not open for further replies.

goingnuts

Technical User
Jan 14, 2004
1
MX
I am using DAO to access an Access 2000 database. The only thing I want to do is list all items in a particular field, ie list all names in the [Names] field. I want to display the names in a listbox. What kind of statement or function should I use to do this? Thank you very much!
 
I'm always using ODBC and then I open a recordset.
Create a new class, derived from CRecordset and tag only the name collumn while creating it, so you will get a Recordset with only the names in it.
Then you can use your recordset for whateveryouwant.

( Hope my english was understandable )
Regards,
SAM
 
A plain ol' SQL statment will work fine

SELECT COLUMN_NAME FROM TABLE_NAME

Matt
 
hi!

Im new to vc++.

I know somebody knows how to bind the recordset to a list control. I want to list all the field names of a certain recordset to a list control and automatically add the records to it.

please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top