View Full Version : InStr() return values


pdbowling
07-05-2005, 12:50 PM
Hi all,
My help files are not working for some reason so until I get them reinstalled...

Would someone please let me know what the return values are for the instr() function are.

IE. If the search string is not found, what does the function return. If it is found, what does it return from the function (true or the position? or somethig else?)

Thanks everyone. I know this is elementary, but my help files aren't working.
PB

modest
07-05-2005, 12:54 PM
Not found = 0
Found = position

modest
07-05-2005, 12:58 PM
Format:
InStr([start, ]string1, string2[, compare])

Return Values:
If InStr returns
string1 is zero-length 0
string1 is Null Null
string2 is zero-length start
string2 is Null Null
string2 is not found 0
string2 is found within string1 Position at which match is found
start > string2 0

pdbowling
07-05-2005, 01:17 PM
Very precise.