In reply to Dave Todd:
> Haven't you answered your question within your OP?
> Instr returns the position of the first occurrence of the 'searched for' character(s) in the string - and returns a 0 if they are not found. So, Instr returns an integer not a boolean - which is why adding the '>0' works.
Got that, just couldn't work out why the original comparison wasn't happening.
I thought that a 0 did get evaluated to false, and a positive number would evaluate to true
if (instr("Hello", "e") then
'do stuff
end if
returns 2, which evaluates to true. I (wrongly) assumed that there would be some boolean comparison going on if I compared two INSTR functions. Hey ho. every day is a schoolday.
Post edited at 11:13