Case sensitive text search

welcomesui@gmail.com

Registered User.
Local time
Today, 05:19
Joined
May 3, 2011
Messages
32
Hi All,

I need to search case sensitive text in a filed

I need to find out the data with “Ltd” only from below data

ABL BIO-TECHNOLOGIES LTD
ABL BIO-TECHNOLOGIES LtD
ABL BIO-TECHNOLOGIES ltd
ABL BIO-TECHNOLOGIES lTD
ABL BIO-TECHNOLOGIES Ltd

I am useing below query but it giving all the fileds

Code:
Like "* Ltd*"

can any one look at this problem

Regards
Hari
 
Use the following in your criteria;
Code:
[URL="http://www.techonthenet.com/access/functions/string/instr.php"]InStr[/URL](1,[YourFiledName],"Ltd",0)<>"0"
 
just to clarify JBB's response, the last parameter for the instr function is a compare method. look at the help

using the constant vbBinaryCompare for the last parameter forces a case sensitive test. the access constant vbBinaryCompare has the value 0, and you can use either the named constant or the explicit value
 
just to clarify JBB's response, the last parameter for the instr function is a compare method. look at the help

using the constant vbBinaryCompare for the last parameter forces a case sensitive test. the access constant vbBinaryCompare has the value 0, and you can use either the named constant or the explicit value
... and in a query you can only use the Integer value.
 
I think the other guys deserved the Thanks... John Big Booty gave you the solution, gemma-the-husky expanded, I just made a specific point (2 cents really) :)
 
Hi vbaInet,

how can I search multiple text strings in one expr1.
Concatenate the FIELDS into one and put your criteria under this field. Bear in mind that with this approach you will lose the power of indexing. So the best way is to put the criteria under each and every field.
 
Hi,
Can I use

Code:
[URL="http://www.techonthenet.com/access/functions/string/instr.php"]InStr[/URL](1,[YourFiledName],"Ltd",0)<>"0" Or 
[URL="http://www.techonthenet.com/access/functions/string/instr.php"]InStr[/URL](1,[YourFiledName],"LTd",0)<>"0" Or 
[URL="http://www.techonthenet.com/access/functions/string/instr.php"][COLOR=#810081]InStr[/COLOR][/URL](1,[YourFiledName],"LTD",0)<>"0" Or 
[URL="http://www.techonthenet.com/access/functions/string/instr.php"][COLOR=#810081]InStr[/COLOR][/URL](1,[YourFiledName],"lTD",0)<>"0"
in one expr1.
 
Just put it under each field, in the same Criteria row and the OR will change to AND.
 
Hi,
Can I use

Code:
[URL="http://www.techonthenet.com/access/functions/string/instr.php"]InStr[/URL](1,[YourFiledName],"Ltd",0)<>"0" Or 
[URL="http://www.techonthenet.com/access/functions/string/instr.php"]InStr[/URL](1,[YourFiledName],"LTd",0)<>"0" Or 
[URL="http://www.techonthenet.com/access/functions/string/instr.php"][COLOR=#810081]InStr[/COLOR][/URL](1,[YourFiledName],"LTD",0)<>"0" Or 
[URL="http://www.techonthenet.com/access/functions/string/instr.php"][COLOR=#810081]InStr[/COLOR][/URL](1,[YourFiledName],"lTD",0)<>"0"
in one expr1.

:confused:

I thought that you wanted a case sensitive search.

vbaInet

He wants Or not and so in the same col on successive rows.

Brian
 

Users who are viewing this thread

Back
Top Bottom