user6522953
user6522953

Reputation: 3

How to find a string within a string Access Query

I would like to run a query to find the string within the 2 brackets of a another string: Example of string : Brand: E[WALDO]

Return = WALDO

Thanks

Upvotes: 0

Views: 840

Answers (1)

Sergey S.
Sergey S.

Reputation: 6336

Try this:

Mid(strSource, 
       InStr(1, strSource, "[") + 1, 
       InStr(strSource, "]") - InStr(strSource, "[") - 1)

Upvotes: 1

Related Questions