ReturnVar Object (Access)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents a variable that was initialized by the SetReturnVar function in a Data Macro.

A ReturnVar object provides a convenient way to use values set in a Data Macro.

Although a ReturnVar object can be used to store information for use in VBA procedures, it does not have the same functionality as a VBA variable.

  • By default, a ReturnVar object remains in memory until the next time that the RunDataMacro method is used.

    Use the Value poperty of the ReturnVar

  • A ReturnVar object can store only text or numeric data. ReturnVar objects cannot store objects.

To refer to a TempVar object in a collection by its ordinal number or by its Name property setting, use the following syntax form:

ReturnVars![name] 

Show: