Creating A Query to run from user definable Tables

hicmoo

New member
Local time
Today, 14:32
Joined
Nov 12, 2003
Messages
3
I am using Access 2003 and I have 30 tables that hold the same information for 30 different clients. I generate annual reports for each client. I am wanting to set up a make table query that will allow me to define the Table I want to pull the data from.

Any Ideas?
 
I would probably do this in code. Have a combo box listing all the possible source tables, and then put some code behind a command button.

Something like:

Dim strSQL As String

strSQL = "SELECT field1, field2, field3 INTO tblYourNewTable FROM " & combobox.value

DoCmd.RunSQL strSQL
 

Users who are viewing this thread

Back
Top Bottom