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

Combo Box Adding at Runtime 1

Status
Not open for further replies.

Woody666

Technical User
Oct 22, 2001
17
0
0
AU
I want to add 'Table' names to a combo box at runtime after a database has been chosen within the program, so I wont know what these table names are until the program is running. ie If the chosen database had tables Table1, Table2, Table3, etc, I would like these to appear in the combo box. I know you can do this using VB and the AddItem method, can it be done in Access some other way.
:-( Woody
 
Hi Woody

You could use:

me!combo.rowsource = "SELECT * From MyTable"

It should do the trick ;-)
 
The lack of ability to add to a list box is a real pain. If you want to add items that don't come from an SQL statement then set the row source type to a value list and then manipulate the rowsoure to: 'list item1;list item2;list item 3' where each entry is separated by a colon. Then simply modify the rowsource to 'add' and 'delete' entries
 
hermanlaksko,

Thanks for the help, however what Im trying to do in the program is once a user selects a database, it will populate the combo box with the names of the tables within the selected database. I believe what you have listed selects all fields from within a table if you know that the table was called "MyTable" for instance.

Thanx
Woody Woody
 

everytime,

Thanks for the response, Ill give it a go. Woody
 

everytime,

Thanks again, Ive just tried it and its exactly what I was looking for. Woody
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top