case-sensitive (1 Viewer)

TBC

Registered User.
Local time
Today, 12:27
Joined
Dec 6, 2010
Messages
145
I've been trying to find a way to make access case-sensitive. in one of my tables I have a Aw and a AW. is there any way I can make it so they both don't look the same in access.

Thanks
 

spikepl

Eledittingent Beliped
Local time
Today, 20:27
Joined
Nov 3, 2010
Messages
6,144
"don't look the same " where exactly. Supply the context in which you wish to discern
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 06:27
Joined
Jan 20, 2009
Messages
12,849
Assuming you want a Where clause to detect the difference.

Use the VBA StrComp() function with the third parameter as 0. Same applies to InStr().
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 19:27
Joined
Sep 12, 2006
Messages
15,614
note that in vba there are alternative options to

"option compare database" that also affect string testing.
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 06:27
Joined
Jan 20, 2009
Messages
12,849
note that in vba there are alternative options to

"option compare database" that also affect string testing.

The alternative, Option Compare Binary, will cause code in that module into case sensitive comparisons but it won't affect the built-in StrComp and InStr functions.

You could go to the trouble of making a case sensitive version of these functions in a public module so they could be used in the database but adding the third parameter to the existing functions seems a lot easier.
 

Users who are viewing this thread

Top Bottom