Selecting Fields from Table for Query (1 Viewer)

shuffine@hcreit.com

Registered User.
Local time
Today, 08:28
Joined
Dec 18, 2013
Messages
19
I am looking for a way to generate a list of all fields within a table, have the end-user select which fields he/she wants to include, and then run the query. I am trying to create this within a form for a nice, easy to use GUI. Has anyone ever done this - and has examples? or can point me in the right direction to find the solution?

I really appreciate it. I am using Access 2010 on Windows. The fields I need them to select from are in one table, however there are many lookup (tblkp) tables related.

Thank you!
 

JHB

Have been here a while
Local time
Today, 14:28
Joined
Jun 17, 2012
Messages
7,732
I am looking for a way to generate a list of all fields within a table, have the end-user select which fields he/she wants to include, and then run the query. I am trying to create this within a form for a nice, easy to use GUI. Has anyone ever done this - and has examples? or can point me in the right direction to find the solution?
You need some code (a For Each loop) to get all the fields name of the table, put them in a temporary table and include a "Yes/No" field.
Use continuous form (bound to the temporary table) where you select which fields you want in the query.
Then some code where you create the query string for the fields you have selected. And then run the query.
 

Users who are viewing this thread

Top Bottom