Substitute a table in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have made a 'basic-table' for compounds.
Then I have made some tables, let's call them case X1, case X2, case X3,
with varying combinations of compounds.
Then I have made a rather camplicated Template-Query on Case X1 with
numerous fields.
On this Template-Query I have made a 'Template Sum Query' where I calculate
the sum of each field.
Now I want to make the same calculations for Case 2. I made a copy of the
Template-Query, gave it a new name and then substituted Case X1 for Case X2.
But HOW do I EASY get the sums for the X2-case.

Greatful for a tip
 
Hi,


The table name cannot be a parameter, so the "easiest" way I see is to get
the statement as a String, and REPLACE(mySql, "Case1", "Case2"), ie, to
replace all occurrences of Case1 by Case2, the table names.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top