Others

Fix Calculated Query Aliases Used as Criteria in Microsoft Access

Rana GarciaRana Garcia Nov 22, 2026 868 views

Question details

Use a calculated query expression as a filter without Access treating its alias as a parameter.

Fix Calculated Query Aliases Used as Criteria in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
A query calculates a value and needs to filter on it, potentially as part of selecting a rate based on day and time.
Observed behavior
Access may prompt for an alias such as Expr3 when it is referenced in criteria within the same query.
Before you start

Open the query in Access and identify the full expression behind the alias, along with the field and table names it uses. If the query references a form control, verify that the form is open and that the control name is correct.

Solution 1Recommended

Repeat the calculation in the query criteria

Use the original expression instead of its alias when filtering within the same query.

1
Open the query design

In the Navigation Pane, right-click the query and select Design View. Find the calculated field, such as Expr3: DateDiff("n", [Start Time Booked], [Finish Time Booked]).

2
Add the expression as a filter

In an empty Field cell, enter DateDiff("n", [Start Time Booked], [Finish Time Booked]). In that column's Criteria cell, enter >60, and clear Show if you do not need a second displayed calculation.

3
Run the query

Select Run on the Query Design ribbon. Replace the example expression and threshold with the calculation and condition needed for your query.

Repeat the calculation in the query criteria
Check date and time values: The DateDiff example assumes the fields contain appropriate dates and times. If they contain times only, a booking that crosses midnight needs additional handling.
Free Microsoft Office alternative

Work with Rate Worksheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with office files. Open compatible spreadsheets and documents to make migration easier; Access databases and queries still require a compatible database application.

Review rate tables and perform calculations in WPS SpreadsheetsCompatible with Microsoft Excel XLSX, Word DOCX, and PowerPoint PPTX formatsFamiliar menus make common office tasks easy to learnFree and lightweight for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Why does Access ask me to enter a value for Expr3?

Access may not recognize a calculated alias in criteria at the same query level and may treat it as a parameter. Repeat the underlying expression or filter Expr3 in an outer query. Also check for misspelled field and control names.

How do I filter a calculated field without repeating a long expression?

Save the calculation as a query, then select Create > Query Design and add that saved query as the source. Add the calculated field to the grid and enter its condition in the Criteria row.

How should I compare a booking time with a rate interval?

Use separate comparisons joined by And, such as booking time >= start time And booking time < end time. An interval that crosses midnight requires special handling because its end time is earlier than its start time.

What if a booking crosses a rate change?

A single rate lookup may not calculate the correct total. Split the booking at each rate boundary, calculate the charge for each interval, and sum the results. Include date changes when selecting the applicable weekday rate.