Bug Alert: InStr() in WHERE Crashes Access

Using string expressions like InStr(), InStrRev(), and Replace() in the WHERE clause of a query can crash Access in certain recent releases.

Bug Alert: InStr() in WHERE Crashes Access

Over at AccessForever.org, Access MVP Maria Barnes reported on a recently released Access bug:

When using the InStr function in the WHERE clause of a query or when filtering a query with an InStr function manually in Datasheet view, it can sometimes crash Access. This is present in version 2403 builds 17425.20146 and 17425.20176 (64 bit). The first affected build was rolled out to the Current Channel (CC) starting on March 29, 2024.

...

The problem actually occurs when one of these functions is used in an expression in a query: InStr, InStrRev, Replace, and the expression is a part of a complex expression.

For more details, check out the full article here:

InStr function in the WHERE clause of a query crashes Access
DescriptionWhen using the InStr function in the WHERE clause of a query or when filtering a query with an InStr function manually in Datasheet view, it can sometimes crash Access. This is present in version 2403 builds 17425.20146 and 17425.20176 (64 bit). The first affected build was rolled out to …

All original code samples by Mike Wolfe are licensed under CC BY 4.0