Question:
in ms access 2003 how can i fill a combo box with the field names from a table?
anothernickname
2007-11-19 13:04:56 UTC
i want to fill a combo box with the field names from a table and use this as a criteria to run a report or a query. if i can only do this then i wouldn't have to go to the query's design grid and change the field name manually from there. is this possible?
Three answers:
anonymous
2007-11-19 20:47:08 UTC
If you want a combo box to show you the Field Names of a table, go into the properties of the combo box and select the "Row Source Type" as Field List. Go to the "Row Source" property and set it to the tables where it should pull the Field Names from.
anonymous
2007-11-19 13:39:07 UTC
Let me see if I understand you - you want a single combobox to display the actual names of the fields (columns) ? If so, I think the only way you could do that would be to go into the VBA code behind, and retrieve the names of the fields (using DAO or ADO), then manually add them to the combobox.

Now, it sounds like you may be referring to actual values in the fields. If not, I don't understand why you would want to chenge the names of the fields in the table (?) More info would be helpful.
Mark G
2007-11-19 15:55:30 UTC
Here is a starting point for you...



http://www.techonthenet.com/access/comboboxes/field_list.php


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...