Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Custom Database Design Consultants
 
Access Programming Examples
 
Access Example Downloads
Access Application Object Examples

Application Object Method Examples
Methods for Controlling Access Objects

Access Tutorials>Application Object Methods> CodeDB



                                   
AccessError Method
AddToFavorites
BuildCriteria Method
CloseCurrentDatabase
CodeDB
CompactRepair Method
ConvertAccessProject


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:

Code DB Method

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

 

Contact Information

Custom Software Development
Microsoft Access 2003 2000 2002(XP) 97 All Windows Versions