Fix Microsoft Access Query Criteria for Dates Before July 1
Question details
Find calculated dates before July 1 by comparing date values in a Microsoft Access query.

- 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.
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.
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.
In Microsoft Access, right-click the query in the Navigation Pane and select Design View.
In a blank Field cell, enter: CalculatedDate: DateAdd("yyyy",[tbl_ComboBox_Categories].[Useful Life],[tbl_Master].[Acquisition Date]).
In the Criteria row of the new column, enter: <DateSerial(Year(Date()),7,1).
Clear the new column's Show checkbox if you do not need it displayed, then click Run to view the matching records.

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.

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.




