Access CodeDB Method Example
CodeDb Method - You can use the CodeDb method in a code module
to determine the name of the Database object that refers to the database in
which code is currently running.
Use the CodeDb method to access Data Access
Objects (DAO) that are part of a library database.
CodeDb Example:
Public Sub DisplayDB()
MsgBox CodeDb.Name
End Sub
The result will be a popup message with the full path and filename of the
database running the code.
Below is an example of the popup message from the code above:

More CodeDB information from Microsoft:
CodeDb Method [Access 2003 VBA Language Reference] --
Use the CodeDb method to access
Data Access Objects (DAO) that are part of a library ...
For example, you can use the CodeDb method in a module in
a library ...
msdn.microsoft.com/library/en-us/vbaac11/html/acmthCodeDb_HV05186363.asp?frame=true |