Fix Greater Than or Equal Criteria in a Microsoft Access Query
Question details
The user needs an Access query to return records where YearsOfService is greater than or equal to 10.

- 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.
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.
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.
Open the table in Datasheet View and inspect the YearsOfService column for blank or nonnumeric entries. Correct values that cannot be stored as numbers.
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.
Open the query in Design View and enter >=10 without quotation marks in the Criteria row under YearsOfService.
Select Run on the query design ribbon and check that the results contain only values of 10 or greater.

Convert the text field in the query
Use a numeric expression when YearsOfService must remain a Short Text field.
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.

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.




