ACC2: Use CurrentDB() Rather Than DBEngine(0)(0)

ID: Q131881


The information in this article applies to:


SYMPTOMS

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

The "CurrentDB Function" topic in the Microsoft Access Help system makes an incorrect recommendation in the "Note" section that reads as follows:


   Note The CurrentDB function is included in this version of Microsoft
   Access for compatibility with previous versions. It is recommended that
   you use the Databases(0) element of the Databases collection instead.
   For more information, see Examples of Converting Code to Version 2.0. 


STATUS

This behavior no longer occurs in Microsoft Access version 7.0.


MORE INFORMATION

The correct recommendation is that you use the CurrentDB() function instead of DBEngine(0)(0) for the following reasons:


REFERENCES

For more information about the CurrentDB() function, search for "CurrentDB," and then "CurrentDB Function (Data Access)" using the Microsoft Access Help menu.


Keywords          : kbprg MdlDao 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: April 29, 1999