Choose query columns from a table based on records in a second table.

  • Thread starter Thread starter Liz Camel
  • Start date Start date
L

Liz Camel

I have two tables.

DataTable has many records in ten columns:
Date Col1 Col2 Col3... Col9



ListTable has 4 records in one column. The four records
may be changed by the user from time to time.
The records are for example:

ListForCols
Col1
Col3
Col6
Col8

I want to have a button that when clicked will generate a
Query (or make a Table) based on the DataTable that has
only the columns named in the TableList records.

The output Query (or made table) would have columns:

Col1 Col 3 Col6 Col8



Any help on how to do this will be appreciated.

Liz
 
Hi Liz,
use online help to lookup DAO.TableDef and Append fields

Luck
Jonathan
 
Thank you, but that seems to just add a new field. I need
to add the data. I need to use the rows/records in the
second table to pick what columns/fields to include in the
query based on the DataTable.
 
Back
Top