ACC95: "Table '<name>' already Exists" Make-Table Query Err Msg

ID: Q140635


The information in this article applies to:


SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you try to run a make-table parameter query more than once, you may receive the following error message and the query may not create the table:

Table '<name>' already exists.

NOTE: This also occurs in Microsoft Access 97 if the database is converted from Microsoft Access 2.0 and the table already exists.


RESOLUTION

If a make-table parameter query creates a table with the same name as an existing table, try one of these methods to avoid the error message mentioned in the "Symptoms" section:


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.


MORE INFORMATION

NOTE: This error message does not occur with nonparameter make-table queries. When you run a typical make-table query more than once, you receive the following confirmation message:


   The existing table '<table name>' will be deleted before you run
   the query. Do you want to continue anyway? 

If you click Yes, the query overwrites the existing table.

Also, note that the SetWarnings Action or Method cannot be used to suppress the error message:

   Table '<name>' already exists 

Steps to Reproduce Behavior


  1. Open the sample database Northwind.mdb.


  2. Copy the Sales By Year query and name it Make Table Test.


  3. Open the Make Table Test query in Design view.


  4. On the Query menu, click Make Table.


  5. In the Make Table box, enter the name Test Table and click OK.


  6. On the Query menu, click Run.


  7. In the "Forms!Sales by Year Dialog!BeginningDate" box, type 1/1/94 and click OK.


  8. In the "Forms!Sales by Year Dialog!EndDate" box, type 12/31/94 and click OK.


  9. When you are asked "Are you sure you want to create a new table with selected records?" click Yes.


  10. Repeat steps 6-8. Note that you receive the message:
    Table 'Test Table' already exists.



REFERENCES

For more information about make-table queries, search on the phrase "make table," and then view "Create a new table from the results of a query with a make-table query" using the Answer Wizard from the Microsoft Access for Windows 95 Help menu.

Additional query words: conversion


Keywords          : kberrmsg QryMktbl 
Version           : 7.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 24, 1999