MS Access InstrRev() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MS Access InstrRev() Function

❮ MS Access Functions

Example

Search for "t" in string "Customer" (start from the end of the string) and return position:

SELECT IntrRev("Customer", "t") AS MatchPosition;

Definition and Usage

The InstrRev() function returns the position of the first occurrence of a string in another string, starting from the end of the string.

Syntax

InstrRev(string1, string2, start, compare)

Parameter Values

Parameter Description
string1 Required. The string that will be searched
string2 Required. The string to search for
start Optional. The starting position for the search. Position -1 is default (which is the last character position)
compare Optional. The type of comparison to perform.

Possible values:
-1: Uses option compare
0: Binary comparison
1: Textual comparison
2: Comparison based on your database

Note

  • The InStr function does not perform a case-sensitive search
  • If string2 is not found within string1, the InstrRev function will return 0
  • If string1 is zero-length, the InstrRev function will return 0
  • If string1 is null, the InstrRev function will return null

Technical Details

Works in: Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

❮ MS Access Functions