MS Access Objects

The functions in this section are exposed in the Business Entities > Library Types > MS Office. See Using the Microsoft Office Library.

The MS Office Functions > Get MSAccess Application function must be invoked prior to using these MS Access functions.

These functions work with MS Access 2007, MS Access 2013, and MS Access 2016. Office 365 is not supported.

The MS Office Functions > Get MSAccess Application function must be invoked prior to using these functions.

Function / Event

Return Value

Description

Syntax

MS Access Application

Create New Record

---

Creates a new MS Access record. This is equivalent to clicking New (blank) record in MS Access.

Create New Record of MSAccess Application

Eval

Text

Evaluates an MS Access expression that results in a text string. This can be a function or a reference to a control on a form. For example, 1 + 1 returns 2, or Date() returns the current date, for example, 9/30/2018 12:00:00 AM.

Eval of MSAccess Application <Select Expression>

Get Active Form

MS Access Form

Returns the name of the active form in the database currently open.

Get Active Form of MSAccess Application

Get Current Database Name

Text

Returns the name of the database currently open in the Microsoft Access window.

Get Current Database Name of MSAccess Application

Get Database Names

List of Text

Returns a list of all the databases.

Get Database Names of MSAccess Application

Get Form By Name

MS Access Form

Returns the specified MS Access form.

Get Form By Name of MSAccess Application <Select Name>

Get Opened Forms Names

List of Text

Returns a list of the names of all the open forms.

Get Opened Forms Names of MSAccess Application

MS Access Control

Cast

MS Access Control

A variable can hold a derived MS Access Control. To access the control, cast the MS Access Control into a variable. Once the variable exists, you can execute the Variable Object functions on it, for example, Set Property, to set the color of the control.

To do this:

1. Declare a local variable, for example, control of type MS Access Control.
2. Declare a local variable object, for example, variant, of type Variable Object.
3. Assign the cast function (of control) to variant.
4. Invoke a function on variant, for example, Set Property.

Cast of MS Access Control

Get Control By Name

MS Access Control

Returns the specified control.

Get Control By of MS Access Control <Select Name>

Get Control Value

Variable Object

Returns the control value into a variable object.

Get Control Value of MS Access Control

Get Controls Names

List of Text

Returns a list of all the controls.

Get Control Names of MS Access Control

Set Control Value

---

Sets the control value using the variable object.

Set Control of MS Access Control < Select Value>

MS Access Form

Analyze

Text

Analyzes the active form and returns form information, form dimensions, and details of the form controls.

Analyze of MSAccess Form

Get Active Control

MS Access Control

Gets the active control.

Get Active Control of MSAccess Form

Get Active Control Name

Text

Returns the name of the active control in the form.

Get Active Control Name of MS AccessForm

Get Control By Name

MS Access Control

Gets the specified control.

Get Control By of MS Access Form <Select Name>

Get Controls Names

List of Text

Returns a list of all the control names in the form that is currently open.

This function is useful as the control names may differ from the control labels that appear in the form.

Get Controls Names of MS Access Form

MS Access TabControl

Get Page By Name

MS Access Control

Gets the specified control.

Get Page By Name on MS TabControl <Select Name>

Get Pages Names

List of Text

Returns a list of the MS Access tabs (pages).

Get Pages Names on MS TabControl <Select

Variable Object

As Boolean

Boolean

Sets the variable object as type Boolean.

As Boolean of Variable Object

As Decimal

Decimal

Sets the variable object as type decimal.

As Decimal of Variable Object

As Number

Number

Sets the variable object as type number.

As Number of Variable Object

As Text

Text

Sets the variable object as type text.

As Text of Variable Object

Get Members

List of Text

Returns a list of the members of the variable object.

Get Member of Variable Object

Get Property

Variable Object

Gets the properties of the specified variable object.

Get Property of Variable Object <Select name>

Get Property With Parameter

Variable Object

Gets the properties of the specified variable object with the specified parameters.

Get Property With Parameter of Variable Object <Select name>, [<Add parameters>]

Get Type Name

Text

Returns the variable object type.

Get Type Name of Variable Object,

Invoke Function With No Parameters

Variable Object

Invokes a function with no parameters.

Invoke of Variable Object <Select Function> With No Parameters

Invoke Function With Parameters

Variable Object

Invokes a function with the specified parameters.

Invoke of Variable Object <Select Function> With [<Add parameters>]

Set Property

---

Sets the value of the specified property.

Set Property of Variable Object <Select name> . <Select value>

To List

List of Variable Object

Returns a list of variable objects.

To List of Variable Object