Copying a query and its table

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

Guest

Hello,

I have a query that i need a second version off but with different data.
This means I need to copy the existing query. It will look exactly the same
as before but I need to connect it to a new table to get the new data. The
data will have the exact format as before.

So farI have tried to copy the query and then using the designview to alter
the property of that table in the alias menu so that the name change to the
new datatable. But it seems that the query is still looking up in the old
datatable.

I also tried to delete the old tables and inserting the new tables but then
i get an error saying that cannot run query because its part of an aggregated
function. Eventhough the table I added is exactly the same but with a new
name.

any ideas ?

all help apretiated

Perag
 
Try the following.

-- Copy the old query
-- Open the new query and alias the existing (old) table using the table
properties. Make it something like XXXX
-- Switch to the sql view (View: SQL) and find where the existing table is
aliased and replace the old table Name with the new table name
-- Switch back to the design view (View: Design), click on the table (XXXX)
and change its alias property to the name of the new table.
 
Thanks alot worked like a charm! :)

Perag

John Spencer said:
Try the following.

-- Copy the old query
-- Open the new query and alias the existing (old) table using the table
properties. Make it something like XXXX
-- Switch to the sql view (View: SQL) and find where the existing table is
aliased and replace the old table Name with the new table name
-- Switch back to the design view (View: Design), click on the table (XXXX)
and change its alias property to the name of the new table.
 
Back
Top