Add a Date Filter to Existing Microsoft Access Combo Box Criteria
Question details
Add a received-date condition to an Access form's existing combo box filters.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- The user wants to retain existing combo box criteria while showing records received at least 10 calendar days before today.
- Observed behavior
- The desired filter combines the existing criteria with a received-date condition.
Open the form in Access Design View and locate the event procedure that builds and applies the existing criteria. Confirm that Received Date is the name of a Date/Time field in the form's record source.
Combine a received-date criterion with the existing filters
Use Access's Date() function and append a string criterion to the existing ApplyFilter expression.
To include the entire calendar day 10 days ago, including records with a time value, use [Received Date] < Date() - 9. The accepted expression, [Received Date] < Date() - 10, instead excludes that entire day and returns records from before it.
In Access, open the form in Design View. Select the control that applies the filters, open its Property Sheet, and use the relevant Event property to open its VBA event procedure.
In the procedure, declare and assign the fourth criterion as a string: Dim strCriteria4 As String followed by strCriteria4 = "([Received Date] < Date() - 9)". Replace Received Date with the actual field name if it differs.
After the existing criteria are built, combine them with And: DoCmd.ApplyFilter , strCriteria1 & " And " & strCriteria2 & " And " & strCriteria3 & " And " & strCriteria4. Include only nonempty criteria so the resulting expression does not contain a dangling And.
Open the form in Form View, choose the combo box values, and run the filter. Check records dated 10 days ago and more recently to verify the boundary.

Review exported Access data in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheet data exported from Access. It supports common Office formats for an easier move between applications, but it does not replace or repair Access forms and VBA filters.

Frequently Asked Questions
Why should I use Date() instead of Today() in Access?
Date() is the Access function that returns the current date. Use it in the VBA criteria string, such as "[Received Date] < Date() - 9".
Does the filter include records received exactly 10 days ago?
The expression [Received Date] < Date() - 9 includes the entire calendar day 10 days ago, even when the field contains a time. The expression [Received Date] < Date() - 10 excludes that day.
What if a combo box criterion is optional?
When building the expression passed to DoCmd.ApplyFilter, append only nonempty criteria and place And between them. An empty criterion can otherwise leave an invalid dangling And.
How can I inspect the combined filter expression?
Add Debug.Print followed by the combined criteria string before DoCmd.ApplyFilter. In the VBA editor, open View > Immediate Window and run the filter to inspect the expression.
What does Date() + 10 do in a filter?
Date() + 10 represents midnight at the start of the calendar day 10 days in the future. A condition such as [Received Date] < Date() + 10 returns dates before that point, not just dates in the past.




