Others

Fix Greater Than or Equal Criteria in a Microsoft Access Query

Elise WilliamsElise Williams Nov 25, 2026 868 views

Question details

The user needs an Access query to return records where YearsOfService is greater than or equal to 10.

Fix Greater Than or Equal Criteria in a Microsoft Access Query
Product
Microsoft Access
Device & OS
not provided
Scenario
The user enters >=10 as a criterion for the YearsOfService field in Query Design.
Observed behavior
Access changes the criterion to >="10" and returns values both above and below 10.
Before you start

Open the table in Design View and check whether YearsOfService is defined as Short Text or Number. Review existing values for nonnumeric entries before changing the field type or converting values in a query.

Solution 1Recommended

Change YearsOfService to a Number field

Use this solution when the field should store numeric years and its existing values can be converted.

Access compares Short Text values as text rather than as numbers. Removing quotation marks alone may not work if the field remains Short Text.

1
Check existing values

Open the table in Datasheet View and inspect the YearsOfService column for blank or nonnumeric entries. Correct values that cannot be stored as numbers.

2
Change the data type

Open the table in Design View, select the YearsOfService row, and change its Data Type from Short Text to Number. Choose a suitable Field Size in Field Properties, then save the table.

3
Set the numeric criterion

Open the query in Design View and enter >=10 without quotation marks in the Criteria row under YearsOfService.

4
Run the query

Select Run on the query design ribbon and check that the results contain only values of 10 or greater.

Change YearsOfService to a Number field
Choose the field size carefully: Select a Number field size that supports the range and precision of your existing values. Access may warn about conversion or reject values that do not fit.
Free Microsoft Office alternative

Use WPS Office for Spreadsheet-Based Data Analysis

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with Microsoft Office formats, making it easy to move spreadsheet work. WPS Spreadsheets can filter numeric data, but it does not fix Microsoft Access queries or replace Access databases.

Filter spreadsheet rows by numeric values such as years of service.Open and edit Microsoft Excel XLS and XLSX files.Use a familiar spreadsheet interface for an easier transition.Work with a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Access add quotation marks around 10?

The field is likely defined as Short Text, so Access treats 10 as text. Check the field's Data Type in the table's Design View.

Can I just remove the quotation marks from the criterion?

If the field is Short Text, Access may add the quotation marks again and compare values as text. Change the field to Number or use a numeric expression in the query.

How do I use Val in Access Query Design?

In an empty Field cell, enter NumericYears: Val([YearsOfService]), then enter >=10 in that column's Criteria row. Check for null and nonnumeric values because they may require separate handling.

Does >=10 include exactly 10?

Yes. When applied to a numeric field or numeric expression, >=10 includes 10 and all larger values.