Partager via


Application Members (Access)

The Application object refers to the active Microsoft Access application.

Methods

Name

Description

AccessError

You can use the AccessError method to return the descriptive string associated with a Microsoft Access or DAO error.

AddToFavorites

The AddToFavorites method adds a hyperlink address to the Favorites folder.

BuildCriteria

The BuildCriteria method returns a parsed criteria string as it would appear in the query design grid, in Filter By Form or Server Filter By Form mode. 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. String.

CloseCurrentDatabase

You can use the CloseCurrentDatabase method to close the current database (either a Microsoft Access database 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.

ColumnHistory

Gets the history of values that have been stored in a Memo field.

CompactRepair

Compacts and repairs the specified database or Microsoft Access project (.adp) file. Returns a Boolean; True if the process was successful.

ConvertAccessProject

Converts the specified Microsoft Access file from one version to another.

CreateAccessProject

You can use the CreateAccessProject method to create a new Microsoft Access project (.adp) on disk.

CreateAdditionalData

Creates an AdditionalData object that can be used to add additional tables and queries to the parent table that is being exported by the ExportXML method.

CreateControl

The CreateControl method creates a control on a specified open form. For example, suppose you are building a custom wizard that allows users to easily construct a particular form. You can use the CreateControl method in your wizard to add the appropriate controls to the form.

CreateForm

The CreateForm method creates a form and returns a Form object.

CreateGroupLevel

You can use the CreateGroupLevel method to specify a field or expression on which to group or sort data in a report. .

CreateReport

The CreateReport method creates a report and returns a Report object. For example, suppose you are building a custom wizard to create a sales report. You can use the CreateReport method in your wizard to create a new report based on a specified report template.

CreateReportControl

The CreateReportControl method creates a control on a specified open report. For more information, see the CreateControl method.

CurrentDb

The CurrentDb method returns an object variable of type Database that represents the database currently open in the Microsoft Access window.

CurrentUser

You can use the CurrentUser method to return the name of the current user of the database. .

CurrentWebUser

Gets information about the current user of a Web database on Microsoft SharePoint Foundation 2010.

CurrentWebUserGroups

Gets the collection of Microsoft SharePoint Foundation 2010 groups of which the user is a member.

DAvg

You can use the DAvg function to calculate the average of a set of values in a specified set of records (a domain).

DCount

You can use the DCount function to determine the number of records that are in a specified set of records (a domain).

DDEExecute

You can use the DDEExecute statement to send a command from a client application to a server application over an open dynamic data exchange (DDE) channel.

DDEInitiate

You can use the DDEInitiate function to begin a dynamic data exchange (DDE) conversation with another application. The DDEInitiate function opens a DDE channel for transfer of data between a DDE server and client application.

DDEPoke

You can use the DDEPoke statement to supply text data from a client application to a server application over an open dynamic data exchange (DDE) channel.

DDERequest

You can use the DDERequest function over an open dynamic data exchange (DDE) channel to request an item of information from a DDE server application.

DDETerminate

You can use the DDETerminate statement to close a specified dynamic data exchange (DDE) channel.

DDETerminateAll

You can use the DDETerminateAll statement to close all open dynamic data exchange (DDE) channels.

DefaultWorkspaceClone

You can use the DefaultWorkspaceClone method to create a new Workspace object without requiring the user to log on again. For example, if you need to conduct two sets of transactions simultaneously in separate workspaces, you can use the DefaultWorkspaceClone method to create a second Workspace object with the same user name and password without prompting the user for this information again.

DeleteControl

The DeleteControl method deletes a specified control from a form.

DeleteReportControl

The DeleteReportControl method deletes a specified control from a report.

DFirst

You can use the DFirst function to return a random record from a particular field in a table or query when you simply need any value from that field. .

DirtyObject

Marks a form or report as dirty.

DLast

You can use the DLast function to return a random record from a particular field in a table or query when you simply need any value from that field. .

DLookup

You can use the DLookup function to get the value of a particular field from a specified set of records (a domain).

DMax

You can use DMax function to determine maximum value in a specified set of records (a domain).

DMin

You can use DMin function to determine minnimum value in a specified set of records (a domain). .

DStDev

Estimates the standard deviation across a population sample in a specified set of records (a domain). .

DStDevP

Estimates the standard deviation across a population in a specified set of records (a domain). .

DSum

You can use the DSum function to calculate the sum of a set of values in a specified set of records (a domain). .

DVar

Estimates the variance across a sample in a specified set of records (a domain).

DVarP

Calculates the variance of a population in a specified set of records (a domain).

Echo

The Echo method specifies whether Microsoft Access repaints the display screen.

EuroConvert

You can use the EuroConvert function to convert a number to euro or from euro to a participating currency. You can also use it to convert a number from one participating currency to another by using the euro as an intermediary (triangulation). The EuroConvert function uses fixed conversion rates established by the European Union.

Eval

You can use the Eval function to evaluate an expression that results in a text string or a numeric value.

ExportNavigationPane

Saves the current configuration of the Navigation Pane to an XML file.

ExportXML

The ExportXML method allows developers to export XML data, schemas, and presentation information from Microsoft SQL Server 2000 Desktop Engine (MSDE 2000), Microsoft SQL Server 6.5 or later, or the Microsoft Access database engine.

FollowHyperlink

The FollowHyperlink method opens the document or Web page specified by a hyperlink address.

GetHiddenAttribute

The GetHiddenAttribute method returns the value of hidden attribute of a Microsoft Access object in the object's Properties dialog box, available by selecting the object in the Database window and clicking Properties on the View menu.

GetOption

The GetOption method returns the current value of an option in the Access Options dialog box, available by clicking the Microsoft Office Button Ff192651.O12FileMenuButton_ZA10077102(en-us,office.14).gif and then clicking Access Options. Variant.

GUIDFromString

The GUIDFromString function converts a string to a GUID, which is an array of type Byte.

HtmlEncode

Converts a string to an HTML-encoded string.

hWndAccessApp

You can use the hWndAccessApp method to determine the handle assigned by Microsoft Windows to the main Microsoft Access window.

HyperlinkPart

The HyperlinkPart method returns information about data stored as a Hyperlink data type. .

ImportNavigationPane

Loads a saved Navigation Pane configuration from disk.

ImportXML

The ImportXML method allows developers to import XML data and/or schema information into Microsoft SQL Server 2000 Desktop Engine (MSDE 2000), Microsoft SQL Server 7.0 or later, or the Microsoft Access database engine.

InstantiateTemplate

Opens a new database and applies the specified template.

IsCurrentWebUserInGroup

Gets whether or not the current user of a Web databse is a member of the specified Microsoft SharePoint Foundation 2010 group.

LoadCustomUI

Loads XML markup that represents a customized ribbon.

LoadFromAXL

Imports the object defined in an Application XML (AXL) file into the database.

LoadPicture

The LoadPicture method loads a graphic into an ActiveX control.

NewAccessProject

You can use the NewAccessProject method to create and open a new Microsoft Access project (.adp) as the current Access project in the Microsoft Access window.

NewCurrentDatabase

Creates a new Microsoft Access database.

Nz

You can use the Nz function to return zero, a zero-length string (" "), or another specified value when a Variant is Null. For example, you can use this function to convert a Null value to another value and prevent it from propagating through an expression.

OpenAccessProject

You can use the OpenAccessProject method to open an existing Microsoft Access project (.adp) as the current Access project in the Microsoft Access window.

OpenCurrentDatabase

You can use the OpenCurrentDatabase method to open an existing Microsoft Access database as the current database.

PlainText

Strips the rich text formatting from a string and returns an unformatted text string.

Quit

The Quit method quits Microsoft Access. You can select one of several options for saving a database object before quitting.

RefreshDatabaseWindow

The RefreshDatabaseWindow method updates the Database window after a database object has been created, deleted, or renamed.

RefreshTitleBar

The RefreshTitleBar method refreshes the Microsoft Access title bar after the AppTitle or AppIcon property has been set in Visual Basic.

Run

You can use the Run method to carry out a specified Microsoft Access or user-defined Function or Sub procedure. Variant.

RunCommand

The RunCommand method runs a built-in command.

SaveAsAXL

Exports the specified object to an Application XML (AXL) file.

SaveAsTemplate

Converts an existing Access database file to a database template (*.accdt) format file.

SetDefaultWorkgroupFile

Sets the default workgroup file to the specified file.

SetHiddenAttribute

The SetHiddenAttribute method sets the hidden attribute of an Access object.

SetOption

The SetOption method sets the current value of an option in the Access Options dialog box.

StringFromGUID

The StringFromGUID function converts a GUID, which is an array of type Byte, to a string.

SysCmd

You can use the SysCmd method to, display a progress meter or optional specified text in the status bar, return information about Microsoft Access and its associated files, or return the state of a specified database object (to indicate whether the object is open, is a new object, or has been changed but not saved). Variant.

TransformXML

Applies an Extensible Stylesheet Language (XSL) stylesheet to an XML data file and writes the resulting XML to an XML data file.

Properties

Name

Description

Application

You can use the Application property to access the active Microsoft Access Application object and its related properties. Read-only Application object.

Assistance

Returns an IAssistance object that represents the Microsoft Office Help Viewer. Read-only.

AutoCorrect

Returns an AutoCorrect object that represents the AutoCorrect settings for Microsoft Access. Read-only.

AutomationSecurity

Returns or sets an MsoAutomationSecurity constant that represents the security mode that Microsoft Access uses when it is programmatically opening files. Read/write. .

BrokenReference

Returns a Boolean indicating whether the current database has any broken references to databases or type libraries. True if there are any broken references. Read-only.

Build

Returns as a Long representing the build number of the currently installed copy of Microsoft Access. Read-only.

CodeContextObject

You can use the CodeContextObject property to determine the object in which a macro or Visual Basic code is executing. Read-only Object.

CodeData

You can use the CodeData property to access the CodeData object and its related collections. Read-only CodeData object.

CodeProject

You can use the CodeProject property to access the CodeProject object and its related collections, properties, and methods. Read-only CodeProject object.

COMAddIns

You can use the COMAddIns property to return a reference to the current COMAddIns collection object and its related properties. Read-only COMAddIns object.

CommandBars

You can use the CommandBars property to return a reference to the CommandBars collection object. Read-only CommandBars object.

CurrentData

You can use the CurrentData property to access the CurrentData object and its related collections. Read-only CurrentData object.

CurrentObjectName

You can use the CurrentObjectName property with the Application object to determine the name of the active database object. The active database object is the object that has the focus or in which code is running. Read-only String.

CurrentObjectType

You can use the CurrentObjectType property together with the Application object to determine the type of the active database object (table, query, form, report, macro, module, server view, database diagram, or stored procedure). The active database object is the object that has the focus or in which code is running. Read-only AcObjectType.

CurrentProject

You can use the CurrentProject property to access the CurrentProject object and its related collections, properties, and methods. Read-only CurrentProject object.

DBEngine

You can use the DBEngine property in Visual Basic to access the current DBEngine object and its related properties. Read-only DBEngine.

DoCmd

You can use the DoCmd property to access the read-only DoCmd object and its related methods. Read-only DoCmd.

FeatureInstall

You can use the FeatureInstall property to specify or determine how Microsoft Access handles calls to methods and properties that require features not yet installed. Read/write MsoFeatureInstall.

FileDialog

Returns a FileDialog object which represents a single instance of a file dialog box. Read-only.

Forms

You can use the Forms property to return a read-only reference to the Forms collection and its related properties.

IsCompiled

The IsCompiled property returns a Boolean value indicating whether the Visual Basic project is in a compiled state. Read-only Boolean.

LanguageSettings

You can use the LanguageSettings property to return a read-only reference to the current LanguageSettings object and its related properties.

MacroError

Returns a MacroError object that contains information about the latest error to occur in a macro. Read-only.

MenuBar

Specifies a custom menu to display for a Microsoft Access database. Read/write String.

Modules

You can use the Modules property to access the Modules collection and its related properties. Read-only Modules object.

Name

You can use the Name property to determine the string expression that identifies the name of an object. Read-only String.

NewFileTaskPane

Returns a NewFile object that represents a document listed on the New File task pane. Read-only NewFile object.

Parent

Returns the parent object for the specified object. Read-only.

Printer

Returns or sets a Printer object representing the default printer on the current system. Read/write.

Printers

Returns the Printers collection representing all the available printers on the current system. Read-only Printers collection.

ProductCode

You can use the ProductCode property to determine the Microsoft Access 2010 globally unique identifier (GUID). Read-only String.

References

You can use the References property to access the References collection and its related properties, methods, and events. Read-only References collection.

Reports

You can use the Reports property to access the read-only Reports collection and its related properties.

Screen

You can use the Screen property to return a reference the Screen object and its related properties. Read-only.

ShortcutMenuBar

You can use the ShortcutMenuBar property to specify the shortcut menu that will appear when you right-click on the specified object. Read/write String.

TempVars

Returns the collection of TempVar objects. Read-only TempVars.

UserControl

You can use the UserControl property to determine whether the current Microsoft Access application was started by the user or by another application with Automation, formerly called OLE Automation. Read/write Boolean.

VBE

You can use the VBE property to return a reference to the current VBE object and its related properties. The VBE property of the Application object represents the Microsoft Visual Basic for Applications editor. Read-only VBE object.

Version

Returns a String indicating the version number of the currently installed copy of Microsoft Access 2010. Read-only.

Visible

Returns or sets whether a Microsoft Access application is minimized. Read/write Boolean.

WebServices

Gets the collection of installed Data Service data connections. Read-only WebServices.