Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make Table Query - Table Already exists error

Status
Not open for further replies.

Blorf

Programmer
Dec 30, 2003
1,608
US
Hi.

I have a make table query, pulling data out of our enterprise software (Mas 200). I run it to get new refreshed data when I need it, and suddenly, it gives me an error saying "Table already exists"

Other similar queries, pulling from the same data source, know to just over write (warnings turned off) but this one table is odd. I deleted the query and re-wrote it, and still the same error.

Not a major issue, just have my code delete the table prior to running the query and all is well, but I would like to understand what the issue is, and why only one table.

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
By default, you will get a message like "Table already exists". Why do you think you shouldn't be getting the message?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I am used to getting "Table already exist, do you want to overwrite?" or some other simlar verbage.

With this query, I get "Table already exists" and the query terminates with no options.

Sorry, I was not clear.

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
I could only guess what the issue is but this would be based on your code, sql, options, and other stuff.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi.

The SQL is

SELECT Rpt_C.* INTO New_C FROM Rpt_C;

The good news is this is not causing me any problems, just an strange thing I would like to understand.

I don't know which options to check, but I have deleted the query and recreated it. Run it with a docmd.runsql command in vba and each thing I tried, I get the same response. Only with this table though. Other objects in the D/B behave normally.

Thanks again,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
I would check to see if New_C was either open somewhere or in design view or it participates in any relationships.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Possibly a permissions problem? Do you have full rights to the table object?

I'm a little confused as any of the potential causes I thought of (most of which Duane had already covered) would also prevent your code deleting the table as well...

Ed Metcalfe.

Please do not feed the trolls.....
 
Hi.

It is odd indeed I think. Yes, I have full rights. Using only the default system.mdw and the file is on a local hard drive. A single user environment.

Again, no need to solve the problem, I just want to know what it is. Much like the missing left sock.

Thanks!

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Please post the SQL of one of the queries that does what you expect.
 
Hi.

Here is a similar query, in the same d/b and from the same linked data source.

SELECT AP1_VendorMaster.* INTO AP1 FROM AP1_VendorMaster;

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
You don't have any query named New_C ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
No. Only Make New_C which makes New_C.

It is really funny, I have never ever had this happen, and only this one query gives the result.

As I mentioned though, I can delete the table with a docmd.delete before I run the query and all works, so thats what I did. Now I just want to understand it because it is a mystery, and who can resist?

ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top