PRA: Make Table Query Deletes Itself When Table Has Same Name
  
PSS ID Number: Q132068
Article last modified on 07-13-1995
 
2.00
 
WINDOWS
 

---------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Access version 2.0
---------------------------------------------------------------------
 
SYMPTOMS
========
 
When you create a make table query, you are prompted to specify the name of
the table to be created. If the table name you specify is the same as the
name you used to save the query, when you run the query, Microsoft Access
prompts you with the following message
 
   Existing Query '<query name>' will be deleted before running the query.
   Continue anyway?
 
CAUSE
=====
 
Microsoft Access stores tables and queries in the same "namespace." It does
so because tables and queries can both be used as sources for new objects,
such as new forms or new queries. But because they are stored in the same
"namespace," giving a table the same name as the make table query creates a
naming conflict. Microsoft Access resolves this naming conflict by deleting
the existing object and replacing it with the new one.
 
RESOLUTION
==========
 
When you specify the name of the table to be created by the make table
query, give the table a name different from the make table query name.
 
STATUS
======
 
This behavior is by design.
 
MORE INFORMATION
================
 
Steps to Reproduce Behavior
---------------------------
 
1. Open the sample database NWIND.MDB.
 
2. Create a new query and add the Employees table. In the QBE grid
   include the First Name and Last Name fields of the Employees table.
   Save the query as EmpNames.
 
3. On the Query menu, click Make Table. In the Query Properties dialog
   box, type "EmpNames" (without the quotation marks) in the Table Name
   box, and then click the OK button.
 
4. On the Query menu, click Run. Note that Microsoft Access prompts you
   with the message described above.
 
REFERENCES
==========
 
Microsoft Access "User's Guide," version 2.0, Chapter 13, "Changing Data
with Action Queries," page 301
 
Additional reference words: 2.00
KBCategory: kbusage
KBSubcategory: QryMktbl
=============================================================================
Copyright Microsoft Corporation 1995.
