Table name as parameter in SQL query built in VBA...

  • Thread starter Thread starter laurentc
  • Start date Start date
L

laurentc

Hi.

I have several tables based on exactly the same fields
(Key/MyDate/Price1/Price2).
I do some statistics on the prices.


However, as I have many different tables (the tables are different
because I directly import the data from a .csv file), I do not want to
create dozens of queries to be able to get the results of the different
tables.

Therefore, I would like to create a query in Access that will ask me
the table name from which to get the data each time I need.

Unfortunately, I find I cannot pass a table name as a Parameter to a
query.

I have to have to program a VBA code to construct a SQL string.
However, I cannot manage to build that code, as I am a beginner in VBA.

I would appreciate any beginning of VBA code, or any other hint or
suggestion.

Thanks,

Laurent
 
Back
Top