Case sensitive search

  • Thread starter Thread starter Rolf Mathisen
  • Start date Start date
R

Rolf Mathisen

I have a search string - Like "*" &
[Forms]![Search]![Ssearchstring1] & "*" - which looks for names.
Is there anyone who knows how to make this "Case sensitive", so that I
will find Anna, but not Johanna?

Regards Rolf
 
You could try using the instr function and

WHERE NameField Like "*" & [Forms]![Search]![Ssearchstring1] & "*"
AND Instr(1,[NameField],[Forms]![Search]![Ssearchstring1],0) > 0

You could actually drop the first line, but I often find that is a bit faster to
include the original search. What I SUSPECT happens is that this is optimized
by first returning the matches to the SQL criteria and then the second criteria
(using VBA) is executed against the returned records.
 
Back
Top