ACC2000: Monolithic Save Dialog Box Doesn't Qualify Object Type Being Saved

ID: Q225869


The information in this article applies to:

This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp).

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


SYMPTOMS

When you save several objects at the same time (monolithic save), you may see the same name listed more than once in the Save dialog box.


CAUSE

You have given two different objects the same name; for example, you have a form and a report named Employees.


RESOLUTION

Microsoft Access 2000 allows you to give different objects the same name, but the objects will appear identical in the monolithic Save dialog box. To avoid this behavior, be sure to name your objects in a manner that distinguishes them.

One naming convention that you can use to distinguish different objects is to use a different prefix for each object, for example:

tbl = table
qry = query
frm = form
mcr = macro
rpt = report
dap = data access page
mod = module
In this manner, you can name a form as frmEmployees and a report as rptEmployees, and be able to determine which name represents which object.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open either the Northwind.mdb or NorthwindCS.adp sample database.


  2. In the Database window, click Reports under Objects, and then click New.


  3. In the New Report dialog box, click AutoReport: Columnar, click Employees in the Choose the table or query where the object's data comes from box, and click OK.


  4. On the File menu, click Save, and save the report with the name Employees.


  5. On the View menu, click Design View.


  6. In the report header, click and drag the Employees label to the right edge of the header section.


  7. Press F11 and click Forms in the Database window.


  8. Open the Employees form in Design view.


  9. In the form header, click and drag the EmployeeName text box to the left edge of the header section.


  10. Press F11 and click Modules in the Database window.


  11. Open the Startup module in Design view.


  12. Place the pointer on the end of the Option Explicit line.


  13. Press the spacebar once and type Startup.


  14. Press ALT+TAB to get back to Microsoft Access.


  15. Close the database by clicking the Close box (X) in the top-right corner of the Database window.

    Note that the Save dialog box appears:
    
        Save changes to the following objects?
            Employees
            Employees
            Startup 
    Note how you can't determine which Employees represents the form and which the report. Click No To All to abandon the changes.



REFERENCES

For more information about naming conventions, see the "Type Prefixes" table in Appendix A of the Advanced Visual Basic 5 book on the MSDN Library at the following Web site:

http://msdn.microsoft.com/library/books/advnvb5/html/z01appa_29.htm

Additional query words: pra distinguish


Keywords          : kbdta 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: June 18, 1999