Table of contents
TOC
Collapse the table of content
Expand the table of content

Application Object (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The Application object refers to the active Microsoft Access application.

Remarks

The Application object contains all Access objects and collections.

You can use the Application object to apply methods or property settings to the entire Access application. For example, you can use the SetOption method of the Application object to set database options from Visual Basic. The following example shows how you can set the Display Status Bar check box on the Current Database tab of the Access Options dialog box.

Application.SetOption "Show Status Bar", True

Access is a COM component that supports Automation, formerly called OLE Automation. You can manipulate Access objects from another application that also supports Automation. To do this, you use the Application object.

For example, Microsoft Visual Basic is a COM component. You can open anAccess database from Visual Basic and work with its objects. From Visual Basic, first create a reference to the Access object library. Then create a new instance of the Application class and point an object variable to it, as in the following example:

Dim appAccess As New Access.Application

From applications that do not support the New keyword, you can create a new instance of the Application class by using the CreateObject function:

Dim appAccess As Object 
Set appAccess = CreateObject("Access.Application")

After you create a new instance of the Application class, you can open a database or create a new database, by using either the OpenCurrentDatabase method or the NewCurrentDatabase method. You can then set the properties of the Application object and call its methods. When you return a reference to the CommandBars object by using the CommandBars property of the Application object, you can access all Microsoft Office command bar objects and collections by using this reference.

You can also manipulate other Access objects through the Application object. For example, by using the OpenForm method of the Access DoCmd object, you can open an Access form from Microsoft Office Excel:

appAccess.DoCmd.OpenForm "Orders"

For more information about creating a reference and controlling objects by using Automation, see the documentation for the application that is acting as the COM component.

Methods

Name
AccessError
AddToFavorites
BuildCriteria
CloseCurrentDatabase
CodeDb
ColumnHistory
CompactRepair
ConvertAccessProject
CreateAccessProject
CreateAdditionalData
CreateControl
CreateForm
CreateGroupLevel
CreateReport
CreateReportControl
CurrentDb
CurrentUser
CurrentWebUser
CurrentWebUserGroups
DAvg
DCount
DDEExecute
DDEInitiate
DDEPoke
DDERequest
DDETerminate
DDETerminateAll
DefaultWorkspaceClone
DeleteControl
DeleteReportControl
DFirst
DirtyObject
DLast
DLookup
DMax
DMin
DStDev
DStDevP
DSum
DVar
DVarP
Echo
EuroConvert
Eval
ExportNavigationPane
ExportXML
FollowHyperlink
GetHiddenAttribute
GetOption
GUIDFromString
HtmlEncode
hWndAccessApp
HyperlinkPart
ImportNavigationPane
ImportXML
InstantiateTemplate
IsCurrentWebUserInGroup
LoadCustomUI
LoadFromAXL
LoadPicture
NewAccessProject
NewCurrentDatabase
Nz
OpenAccessProject
OpenCurrentDatabase
PlainText
Quit
RefreshDatabaseWindow
RefreshTitleBar
Run
RunCommand
SaveAsAXL
SaveAsTemplate
SetDefaultWorkgroupFile
SetHiddenAttribute
SetOption
StringFromGUID
SysCmd
TransformXML

Properties

Name
Application
Assistance
AutoCorrect
AutomationSecurity
BrokenReference
Build
CodeContextObject
CodeData
CodeProject
COMAddIns
CommandBars
CurrentData
CurrentObjectName
CurrentObjectType
CurrentProject
DBEngine
DoCmd
FeatureInstall
FileDialog
Forms
IsCompiled
LanguageSettings
MacroError
MenuBar
Modules
Name
NewFileTaskPane
Parent
Printer
Printers
ProductCode
References
Reports
ReturnVars
Screen
ShortcutMenuBar
TempVars
UserControl
VBE
Version
Visible
WebServices

See also

Access Object Model Reference

© 2017 Microsoft