ACC: Obtain Name of Current User Database Using Access Basic (89681)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
This article was previously published under Q89681 SUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.
Microsoft Access version 1.x does not have a built-in way to determine the
name of the database that the user currently has open. This article lists
a sample Access Basic function that you can use in Microsoft Access 1.x to
find the name of the database.
In Microsoft Access version 2.0, you can find the name of the database
using data access objects (DAO). With DAO, you can use the Name property
of the DBEngine object to find the path and name of the currently open
database. For more information about the DBEngine object, search for
"DBEngine," and then "DBEngine Object" using the Microsoft Access 2.0 Help
menu.
This article assumes that you are familiar with Access Basic and with
creating Microsoft Access applications using the programming tools
provided with Microsoft Access. For more information on Access Basic,
please refer to the "Introduction to Programming" manual in Microsoft
Access version 1.x, or the "Building Applications" manual in version 2.0.
REFERENCES
For more information about using DAO, please see the following article in
the Microsoft Knowledge Base:
113919 ACC: How to Get the Name of the Current Database
Modification Type: | Major | Last Reviewed: | 5/9/2003 |
---|
Keywords: | kbhowto kbprogramming KB89681 |
---|
|