Access Application Objects
Access application objects contain all of the Access database objects and collections.
Application Object methods can be used to apply property settings to the entire Microsoft Access program. For example, you can use the SetOption
Method of the application object to set database options from Visual Basic.
As time permits we will add definitions to each of the
Application object methods listed below:
Access Error Method
You can use the Access Error method
to return the description associated with a Microsoft Access or DAO error when
the error hasn't actually occurred. However, you can't use the AccessError
method for ADO errors.
AddToFavorites
The AddToFavorites method adds the name of the
current database to the Favorites folder.
When applied to a Control object, the AddToFavorites method adds the hyperlink
address contained in a control to the Favorites folder.
The AddToFavorites method has the same effect as clicking AddToFavorites on the
Favorites menu on the Web toolbar when view a page on the internet.
BuildCriteria
The BuildCriteria method returns a criteria string as it would appear in the
criteria line in the query design grid. For example, you may want to set a
form's Filter or ServerFilter property based on varying criteria from the user.
You can use the BuildCriteria method to construct the string expression argument
for the Filter or ServerFilter property.
CloseCurrentDatabase Method
You can use the CloseCurrentDatabase
method to close the current database (either a database (.mdb)
or an Access project (.adp) from another application that has opened a database
through Automation.
CodeDb
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.
CompactRepair
Compacts and repairs the specified
database (.mdb) or Access project (.adp) file. Returns a Boolean; True
if the process was successful.
ConvertAccessProjectod
Converts the specified Access database file from one version to another Access version.