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

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
 
J

Jonathan Parminter

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

Luck
Jonathan
 
L

Liz Camel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top