Have access Prompt me for table name

SiGill

Registered User.
Local time
Today, 05:52
Joined
Dec 22, 2008
Messages
72
In an SQL query in Access can I have it so it asks me for the table name?
I need to run the same query for 13-18 different tables so I was going to make a union query in SQL and be prompted for each table name. The table names are always changing.

many Thanks
 
you would have to do this in code, i think - i dont think yuo could do it any other way

but you shouldnt have 18 similar tables - this sounds like a mormalisation issue - you sohuld have all the "same" data in a single table, distinguished by some appropriate identifier - then you only have 1 query to worry about - and you wont have to keep redesigning the database as your table numbers expand
 
In an SQL query in Access can I have it so it asks me for the table name?
No
I need to run the same query for 13-18 different tables so I was going to make a union query in SQL and be prompted for each table name. The table names are always changing.
Always changing table names are a nightmare, I would do anything and everything possible to make them a contant.

There are ways around this using some "smart" vba code, however making the tablenames a contant instead of an ever changing target is much more prevered.
 

Users who are viewing this thread

Back
Top Bottom