View Full Version : EXACT TEXT MATCH including Case


GohDiamond
09-04-2007, 11:31 AM
Hello,

I there any way to get MS Access to distinguish between, for example,

'AB' vs. 'ab'

in an if statement; something like :

dim X as string
dim Y as string

X='AB'
Y='ab'

if X= Y then
msgbox "Match"
else
msgbox "Doesn't Match"
end if


In this case the msgbox should be "Doesn't Match"

I've been scratching my head over this one for a bit. Any Help would be appreciated.

Thanks in advance,
Goh

pbaldy
09-04-2007, 11:54 AM
Never needed it, but you might want to explore the options for the "Option Compare" statement at the top of each module. According to Help,

Use Option Compare to specify binary or text comparison. In English-U.S., binary comparisons are case sensitive; text comparisons are not.

GohDiamond
09-04-2007, 01:44 PM
Perfect. I changed Option Compare Database to Option Compare Binary and got the result I'm looking for.

Many Thanks!
Cheers,
Goh