Others

Fix Microsoft Access Query Criteria for Dates Before July 1

Aamir Naveed AkramAamir Naveed Akram Nov 22, 2026 868 views

Question details

Find calculated dates before July 1 by comparing date values in a Microsoft Access query.

Fix Microsoft Access Query Criteria for Dates Before July 1
Product
Microsoft Access
Device & OS
not provided
Scenario
A query calculates a date from an acquisition date and a useful life in years, then filters for dates before July 1.
Observed behavior
The date criterion does not work as intended when the calculated date is formatted as text instead of compared as a date value.
Before you start

Open the query in Design View and confirm that Acquisition Date contains date values and Useful Life contains the number of years to add. Adjust the table and field names in the expression if yours differ.

Solution 1Recommended

Compare the calculated date with a DateSerial value

Use a separate calculated column to filter true date values before July 1 of the current year.

Format can turn a date into text. Keep the calculated value as a date for filtering, even if you use a separate formatted column for display.

1
Open the query design

In Microsoft Access, right-click the query in the Navigation Pane and select Design View.

2
Add a calculated date column

In a blank Field cell, enter: CalculatedDate: DateAdd("yyyy",[tbl_ComboBox_Categories].[Useful Life],[tbl_Master].[Acquisition Date]).

3
Apply the date criterion

In the Criteria row of the new column, enter: <DateSerial(Year(Date()),7,1).

4
Hide and run the column

Clear the new column's Show checkbox if you do not need it displayed, then click Run to view the matching records.

Compare the calculated date with a DateSerial value
July 1 is excluded: The less-than operator returns dates before July 1 of the current year, not dates on July 1.
Free Microsoft Office alternative

Review exported Access data in WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface. Export Access data to an Excel workbook to move it into WPS Spreadsheets for review; WPS does not fix or run Access queries.

Review and filter exported query results in WPS SpreadsheetsCompatible with Microsoft Excel XLSX and XLS filesFamiliar spreadsheet interface for an easier transitionFree and lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why does formatting a date affect my Access query criterion?

The Format function returns text, so the query may compare a string rather than a date. Use the unformatted DateAdd expression in a separate query column for the criterion.

Does the criterion include July 1?

No. The criterion <DateSerial(Year(Date()),7,1) excludes July 1. Use <= instead if July 1 should be included.

How can I filter by the calculated date without showing it?

In Query Design View, add the DateAdd expression, enter the criterion in its Criteria row, and clear that column's Show checkbox.

Can WPS Office run my Access query?

No. Run the query in Microsoft Access, then export the results to an Excel workbook if you want to review them in WPS Spreadsheets.