Applies ToAccess for Microsoft 365 Access 2024 Access 2021 Access 2019 Access 2016

Determines whether the value of an expression is equal to any of several values in a specified list.

Syntax

expr [Not] In(value1, value2, . . .)

Remarks

The In operator syntax has these parts:

Part

Description

expr

Expression identifying the field that contains the data you want to evaluate.

value1, value2

Expression or list of expressions against which you want to evaluate expr.

If expr is found in the list of values, the In operator returns True; otherwise, it returns False. You can include the Not logical operator to evaluate the opposite condition (that is, whether expr is not in the list of values).

For example, you can use In to determine which orders are shipped to a set of specified regions:

SELECT *FROM OrdersWHERE ShipRegion In (‘Avon’,’Glos’,’Som’);

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.