ACC: .MDB File Extension Automatically Added to Database Name

ID: Q164789


The information in this article applies to:


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you create a new database, Microsoft Access automatically adds the .mdb file extension to the database name, even if you type your own file extension in the File Name box.

This applies to all dialog boxes in Microsoft Access where you specify a database name, for example when you create a new database, compact a database, or create a replica database.


CAUSE

This behavior is exhibited in all applications that use the common dialog box in Microsoft Windows 95 and later or Microsoft Windows NT version 4.0.


RESOLUTION

There are two ways you can save a database with a file name extension other than .mdb.

Select a Different File Type in the Save As Type Box

If you want to save your database with a .mda, .mdw, or .mde file extension, select one of those file types in the Save As Type box. For example, if you select Workgroup Files (*.mdw) in the Save As Type box, and you type MyDB in the File Name box, the database name becomes MyDB.mdw.

If you want to save your database with an extension other than .mdb, .mda, .mdw, or .mde, select All Files (*.*) in the Save As Type box. This causes Microsoft Access to save the database with the exact name you type in the File Name box. For example, if you select All Files (*.*) in the Save As Type box, and you type MyDB.xyz in the File Name box, the database name remains MyDB.xyz when you save it.

NOTE: If you name a database with a file extension other than .mdb, .mda, .mdw, or .mde, the database is not automatically associated with Microsoft Access. That means you cannot start Microsoft Access and open the database by double-clicking the database name in File Manager or Windows Explorer. You must create a file association between Microsoft Access and your particular file extension first.

For more information about creating file associations in Windows 95 and later or Windows NT, please see the following article in the Microsoft Knowledge Base:



Q132737 WW1195: Commonly Asked Windows 95 Questions and Answers

Type Quotation Marks Around Your File Name

If you type quotation marks around your file name in the File Name box, Microsoft Access saves the file with the name you type, regardless of what appears in the Save As Type box. For example, if you select Microsoft Access Databases (*.mdb) in the Save As Type box, and you type "MyDB.xxx" in the File Name box, the database name remains MyDB.xxx.


STATUS

This behavior is by design.


MORE INFORMATION

When you save a database file, Microsoft Access compares the name you type in the File Name box with the type of file you select in the Save As Type box. If your file name does not include an extension, or the extension you type does not match the type of file you select, Microsoft Access automatically appends an extension for you.

The following table shows examples of how Microsoft Access names a database file depending on what you type in the File Name box and what you select in the Save As Type box:


   File Name Box   Save As Type Box                     Database File Name
   -----------------------------------------------------------------------
   MyDB            Microsoft Access Databases (*.mdb)   MyDB.mdb
   MyDB.mdb        Microsoft Access Databases (*.mdb)   MyDB.mdb
   MyDB.mdw        Microsoft Access Databases (*.mdb)   MyDB.mdw.mdb
   MyDB.mde        Workgroup Files (*.mdw)              MyDB.mde.mdw
   MyDB.mdw        Workgroup Files (*.mdw)              MyDB.mdw
   MyDB.mde        All Files (*.*)                      MyDB.mde
   "MyDB.mde"      Microsoft Access Databases (*.mdb)   MyDB.mde 


REFERENCES

For more information about .mda files, search the Help Index for "mda files."

For more information about .mdw files, search the Help Index for "workgroup information files," or ask the Microsoft Access 97 Office Assistant.

For more information about .mde files, search the Help Index for "MDE files," or ask the Microsoft Access 97 Office Assistant.

For more information about the common dialog box in Microsoft Windows 95 and later or Microsoft Windows NT version 4.0, please see the following article in the Microsoft Knowledge Base:

Q125708 Applications Using Common Dialogs Append Default Extension



For more information about how this topic applies to other Microsoft Office products, please see the following articles in the Microsoft Knowledge Base:

Q131161 Default File Extension Added to Filename Using Save As

Q133342 File Type Option Changes Filename Within Quotation Marks


Keywords          : kbusage GnlOthr RplGen UifOthr 
Version           : 7.0 97
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 19, 1999