TempVars object (Access)

Represents the collection of TempVar objects.


Use the Add method or the SetTempVar macro action to create a TempVar object.

Use the Remove method or the RemoveTempVar macro action to delete a TempVar object from the TempVars collection.

Use the RemoveAll method or the RemoveAllTempVars macro action to delete all TempVar objects from the TempVars collection.

The TempVars collection can store up to 255 TempVar objects. If you don't remove a TempVar object, it will remain in memory until you close the database. It's a good practice to remove TempVar object variables when you are finished using them.

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

  • TempVar![name]



See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.