Using all tables

C

ChuckTX

Is there a way to run a query on every table that is in the database? I am
linking multiple excel files as tables. I want to run the same query on all
of them, but I would like to not have to change the query every time that a
new file is added.
Something like:
Select * from *

Can you use wildcards in the table names? I could name them all similar.
Thanks, Chuck
 
C

chris.nebinger

No, you can't without changing the query. You could write VBA code to
do what you want.


What are you trying to do? Create a union query that lists all of
them?


Chris Nebinger
 
C

ChuckTX

Yes basically that's what I'm trying to do. Here's the fun part though
atleast I think. I'm trying to do all of the querrying in Access but not
actually open Access. I'm tryingto retrieve the data from an Excel import.
I may have to though. Do you have suggestions on the code? I've posted the
question in the programming section to keep it on topic. the title is
'Making a query from vba'
here's the adress
http://www.microsoft.com/office/com...664b-4783-8dfd-8a27ea61cfca&lang=en&cr=US&p=1

Thanks Chris,
Chuck
 
Top