I have accidentally noticed a behavior of the String.Replace function that does not match the documentation from the Object Browser.
According to the Object Browser, the default value of the optional parameter 'Compare' is 'vbBinaryCompare':
However, the actual behavior is not like this. Here is a recording from the Immediate Window:
Without specifying the 'Compare' parameter, the result should actually be 'False'.
Is that the same for you?
I am using Access 2016 including all updates. VBA is version 7.1.1146
According to the Object Browser, the default value of the optional parameter 'Compare' is 'vbBinaryCompare':
However, the actual behavior is not like this. Here is a recording from the Immediate Window:
Code:
?Replace("A", "a", "x", , ,vbTextCompare) = "x"
True
?Replace("A", "a", "x", , ,vbBinaryCompare) = "x"
False
?Replace("A", "a", "x") = "x"
True
Without specifying the 'Compare' parameter, the result should actually be 'False'.
Is that the same for you?
I am using Access 2016 including all updates. VBA is version 7.1.1146