Also, I'd suggest checking out the Option Compare statement in VBA Help.
When set at module level, it will determine the default comparison method to
use for comparing strings so that you do not have to set/reset this option.
Just to make sure that I have interpreted your question correctly ...
In: InStr(1, txtCol, "maint", vbTextCompare) "maint" and "Maint" are
considered equal. So, if the value of your control, txtCol, is: 123Maint,
the expression above will return 4.
In: InStr(1, txtCol, "maint", vbBinaryCompare) "maint" and "Maint" are
not equal. if the value of your control, txtCol, is: 123Maint, the
expression above will return 0.
hth,
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.