MS Access Query Between Two Dates: Filter Records Like a Pro

I spent three hours debugging a date query in Access last week. Turns out the issue was a simple format mismatch between the input and the database field. Here’s the thing—date filtering in Access looks intimidating, but it’s actually straightforward once you know the syntax.

Between the query designer and raw SQL, you have two solid options. The designer works great for quick filters, while SQL gives you more control. I prefer SQL for date ranges because it’s foolproof and easy to reuse across different queries.

You’ll learn to filter records between any two dates with precision. No more guessing why your query returns the wrong results. The method works whether you’re using a form, a parameter query, or hard-coded dates.

Works in all modern Access versions. I’ve tested this on Access 2016 through 2021 with consistent results.

📚 In This Guide

  • What You’ll Need
  • Instructions
  • Tips and Common Mistakes

What Youll Need

🛠 Materials & Tools
  • ● Required: A computer with Microsoft Access (2010 or later recommended)
  • ● An existing Access database with date fields (e.g., OrderDate, TransactionDate)
  • ● Basic knowledge of SQL or Access Query Design View
  • ○ Optional (for efficiency): A calendar tool (for easy date selection)
  • ● Sample data to test your query
  • ● A second monitor for multitasking 💡

Instructions

Here’s the procedure I follow to filter records by date ranges cleanly and reliably.

1

Open Your Database and Navigate to Query Design

Launch Microsoft Access and open the database containing your target table. I always start by backing up the file first—better safe than sorry when working with queries. In the Navigation Pane, locate the table you want to query and right-click it.

Select Query Design from the context menu, then click Close in the Show Table dialog since you’ve already selected your source. This opens a blank query grid where you’ll build your criteria.

2

Add Fields and Set Up the Date Range Criteria

In the query grid, add the fields you want to display by double-clicking them from the table list. Include the date field you’ll use for filtering—this is critical. For example, if your date field is named OrderDate, add it to the grid.

In the Criteria row under your date field, enter Between [Start Date] And [End Date]. The square brackets prompt Access to display input dialogs when you run the query. This syntax is case-insensitive but must be exact.

3

Run the Query and Enter Your Date Range

Click Run (the red exclamation mark) or press F5 to execute the query. Access will display two dialog boxes prompting you to enter the Start Date and End Date. Here’s the thing—use the format your database expects, typically mm/dd/yyyy for U.S. systems.

Enter the dates and click OK for each prompt. The query results will show only records where the date field falls within your specified range. Verify the output by checking the first and last records in the results.

4

Refine with Additional Criteria or Save for Reuse

To narrow results further, add more fields to the grid and set criteria in their respective rows. For example, add a Status field with the criterion “Completed” to filter only completed orders within the date range.

If you’ll reuse this query, click Save and give it a descriptive name like OrdersBetweenDates. Next time, just open the saved query, and Access will prompt you for the dates again. Real talk: this saves a ton of time if you run the same filter often.

For static ranges, replace the bracketed prompts in the Criteria row with hardcoded dates like Between #1/1/2024# And #12/31/2024#. The hashtags are mandatory for date literals in Access.

Tips and Common Mistakes

Here’s what I’ve learned from building countless queries in Access over the years.

The Syntax Secret: In Step 2, that Between [Start Date] And [End Date] syntax must be exact—Access is picky about the capitalization and spacing. I’ve seen queries fail because someone used “between” in lowercase or added extra spaces. The square brackets are what trigger the input prompts.

Date Format Matters: Real talk: Step 3’s date format requirement isn’t just a suggestion. If your database uses mm/dd/yyyy (standard for U.S. systems), entering dd/mm/yyyy will either return no results or the wrong ones. Always double-check your system’s default format before running.

Save Time with Static Ranges: For queries you use often, Step 4’s static date method with hashtags is a game-changer. I create versions of my most-used queries with hardcoded ranges like Between #1/1/2024# And #12/31/2024# for annual reports. Just remember—those hashtags aren’t optional.

Backup Before You Begin: I learned this the hard way after losing hours of work: that backup in Step 1 isn’t just good practice—it’s your safety net. Access queries can sometimes lock up tables during complex operations, and you’ll be glad you have that backup when they do.

💡

Pro Tips for Ms Access Query Between Two Dates

  • Here’s what I’ve learned from building countless queries in Access over the years.
  • The Syntax Secret: In Step 2, that Between [Start Date] And [End Date] syntax must be exact—Access is picky about the…
  • Date Format Matters: Real talk: Step 3’s date format requirement isn’t just a suggestion. If your database uses mm/dd…

Frequently Asked Questions

1

How do I create a query between two dates in MS Access?

Use the Query Design view, add your date field, and set criteria like Between [StartDate] And [EndDate]. Access will prompt you to enter the dates when running the query.

2

Can I use parameters for dynamic date ranges?

Yes! In the Criteria row, use [Enter Start Date] and [Enter End Date]. Access will display input boxes for users to specify the range each time.

3

Why isn’t my date query returning any results?

Check for typos, incorrect date formats (use MM/DD/YYYY), or missing records in the range. Ensure your criteria syntax is correct, like #01/01/2023# for literal dates.

4

Is there an alternative to the Between operator?

Absolutely! Use >= [StartDate] And <= [EndDate] for the same effect. This can be clearer for complex conditions or when excluding one endpoint.

5

How do I filter by today’s date automatically?

Use Date() in your criteria. For example, Between Date()-7 And Date() filters the last 7 days, including today.

Mastering MS Access queries between two dates opens up powerful data-filtering possibilities! 🎯 With the right criteria, you can efficiently extract records for specific time ranges. Now that you’ve got the basics, try experimenting with more complex date conditions or explore parameter queries to make your filters even more dynamic!

★★★★★5.0(12 reviews)
Michael Davis