make-table query and Table already exits

L

lynda

I want to use a crosstab query qryA as a base to make a
table tblA. The corsstab query qryA accepts parameters so
that the number of column headings is not fixed. I use
make-table query to make the table. The first time I use
the make-table query is ok, but later on, it always gives
me error message: Table "tblA" already exits.
My make-table query is this:
SELECT qryA.* INTO tblA
FROM qryA;
I am thinking this is caused by "Select qryA.*", but my
column headings are different each time, how could I make
a table based on this query? Thanks for your help!
Best Regards
Lynda
 
M

Michel Walsh

Hi,


tblA already exists in the database, you can't have a second one with the same name. Either DROP
the existing table before,

DROP TABLE tblA

then, run you make table query, either, use a new name, for the table to be created, in your make
table query.



Hoping it may help,
Vanderghast, Access MVP
 
L

lynda

Thank all of you!
I did use setwarnings false, after the action set warnings
true. I have other make-table queries, they work fine. But
this one refuses to make a table and gives the error
message if it already exists. Then I do delete the
existing table first, it works fine. The difference
between this make-table query and others is just "select
tblA.*" and "select column1, column2, ..", I just couldn't
understand why this happend.
Thanks for your help!
Best Regards
Lynda
 
L

lynda

Thanks!
I delete the table first, then it works! I wonder why my
other make-table queries don't have this problem. They
just give warnings first, if I select yes, it delete the
old onem then make the new with the same name. But this
one doesn't give warning, just give the message, then do
nothing! Anyway, I took your advice and drop the tabel
first, it works now. Thanks!
Best Regards
Lynda
-----Original Message-----
Hi,


tblA already exists in the database, you can't have a
second one with the same name. Either DROP
the existing table before,

DROP TABLE tblA

then, run you make table query, either, use a new name,
for the table to be created, in your make
 

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

Top