logo
search
Others

How to Fix Microsoft Access TempVars Object Property Error

Maira MehtabMaira Mehtab Sep 27, 2026 869 views

Question details

Users encounter a property error when using a period in a TempVars object name in Microsoft Access.

Product
Microsoft Access
Device & OS
not provided
Scenario
Executing expressions or assigning values involving TempVars in an Access database.
Observed behavior
Access returns an 'Object does not support this property or method' error when encountering variable names like TempVars!Temp.PL_ID.
Before you start

Review your Access VBA code or macros to locate the exact line where the TempVar is being declared or assigned, paying close attention to the variable naming conventions.

Solution 1Recommended

Remove Periods from TempVar Names

Rename your TempVars to exclude periods, which Access misinterprets as property separators.

In Microsoft Access, a period (.) acts as a separator for properties and methods. Including a period in a custom TempVar name causes Access to misinterpret the variable, resulting in the 'Object does not support this property or method' error.

1
Locate the invalid TempVar name

Open your Access VBA module or macro where the variable is assigned (e.g., TempVars!Temp.PL_ID).

2
Rename the variable

Remove the period from the name. For example, change Temp.PL_ID to PL_ID.

3
Use the Add method to initialize

Create the TempVar properly before assigning complex lookup results. Use the following syntax: TempVars.Add "PL_ID", DLookup("Overhead_ID", "ProfitLoss_Temp").

4
Reference the new name

Update any subsequent expressions in your database to use the new valid name, such as TempVars!PL_ID instead of TempVars!Temp.PL_ID.

Naming Conventions: Always use alphanumeric characters and underscores for TempVars to ensure maximum compatibility in Access.
Free Microsoft Office alternative

Switch to WPS Office for Seamless Data Management

While WPS Office does not include a direct equivalent to Microsoft Access, WPS Spreadsheet is a powerful, lightweight, and free alternative for managing large datasets, creating complex formulas, and analyzing records without writing complex VBA code.

Fully compatible with Microsoft Excel (.xlsx, .xls, .csv) formats.Lightweight design ensures quick loading of large data files.Intuitive interface familiar to Microsoft Office users.Built-in advanced formulas and data processing tools for seamless transitions.
microsoft office alternative - wps office

Frequently Asked Questions

What does 'Object does not support this property or method' mean in Access?

This error usually occurs when you try to use a method or property that doesn't exist for a specific object, often caused by typos or using invalid characters like periods in variable names.

How do I correctly declare a TempVar in Access VBA?

You can declare and assign a TempVar simultaneously using the Add method in your code. For example: TempVars.Add "VariableName", Value.

Can I use spaces in an Access TempVar name?

While Access may allow spaces if the name is enclosed in brackets, it is highly recommended to use CamelCase or underscores (e.g., MyVariable or My_Variable) to avoid expression evaluation errors.