Unanswered: Finding the table name of each field in a query
I have a query consisting of several fields from several tables. It is no problem to populate a combo box with the field names from the query (I use the vba code "For each tablefield in recordset.fields" etc), but how can I populate the combo box with all table names from the query? I know how to find ALL tables in the database, but how can I find only the tables included in my query? Thanks in advance!
Among the tables in my query, there are 3 tables with almost identical field names. I am going to use the combo box to have the users choose which field they want to search, and with the similar field names they get confused. Therefore, I want to display the table name in addition to the field name to avoid confusion.
Yes, but won't that take very long time to write when I have many columns in my query (and maybe need to edit my query every once in a while)? But anyway, what I need is that when I add a column to the combo box, I need it to add which table (table name) the column comes from. How do I do that?