SetReturnVar Macro Action (Access custom web app)

Office 2013 and later

The SetReturnVar action creates a return variable and sets it to a specific value.

Last modified: March 09, 2015

Applies to: Access 2013 | Access 2016

Important note Important

Microsoft no longer recommends creating and using Access web apps in SharePoint. As an alternative, consider using Microsoft PowerApps to build no-code business solutions for the web and mobile devices.

Note Note

The SetReturnVar action is available only in Data Macros.

The SetReturnVar action has the following arguments.

Argument name

Required

Description

Name

Yes

A string that specifies the name of the variable.

Expression

Yes

An expression that will be used to set the value for this temporary variable. Do not precede the expression with the equal sign (=). You can click the Build button to use the Expression Builder to set this argument.

The SetReturnVar action is used to create a ReturnVar, which is variable that can be used by macros that call a data macro by using the RunDataMacro action.

Once a ReturnVar is created by the SetReturnVar action, the calling macro can use it in an expression. For example, if you created a ReturnVar named UpdateSuccess, you could use the variable by using the following syntax:

=[ReturnVars]![UpdateSuccess]

The SetReturnVar action can be used only in named data macros. It is not available in data macros that are attached to a data macro event.

Show: