473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Can I force a query criteria to limit to Like "*ABC*" - forcing the cap's ?

MLH
If I drop Like "*ABC*" in a QBE grid criteria cell,
the records returned include mixed case. Can I
force the uppercase limitation in a QBE grid?
Jun 27 '08 #1
7 2420
MLH wrote:
If I drop Like "*ABC*" in a QBE grid criteria cell,
the records returned include mixed case. Can I
force the uppercase limitation in a QBE grid?
You could create a calculated column. Ex:
UcaseField:Ucase(FieldName)
then put the filter criteria under that column. You could also use
StrConv() as well.

Hanahana
http://www.youtube.com/watch?v=VoI4-...eature=related

Jun 27 '08 #2
MLH
On Tue, 27 May 2008 09:53:25 -0700, Salad <oi*@vinegar.comwrote:
>MLH wrote:
>If I drop Like "*ABC*" in a QBE grid criteria cell,
the records returned include mixed case. Can I
force the uppercase limitation in a QBE grid?

You could create a calculated column. Ex:
UcaseField:Ucase(FieldName)
then put the filter criteria under that column. You could also use
StrConv() as well.

Hanahana
http://www.youtube.com/watch?v=VoI4-...eature=related
Not a bad idea. But there's one gotcha. (there's always
one of them, isn't there?)

I have rows that contain say "NC" ==the state abbreviation
for North Carolina. And I have rows that contain XYZ Company, Inc
(which has an "nc" in it). I ONLY want the rows containing the
uppercase NC anywhere in the string.
Jun 27 '08 #3
MLH
I've tried crit's like Like "*" & Chr$(78) & "*"

but they return strings with both N's and n's.
Forcing the uppercase characteristic of a given
letter of the alphabet may just not be possible in
a query. But I'm not giving up hope.
Jun 27 '08 #4
MLH wrote:
I've tried crit's like Like "*" & Chr$(78) & "*"

but they return strings with both N's and n's.
Forcing the uppercase characteristic of a given
letter of the alphabet may just not be possible in
a query. But I'm not giving up hope.
InStr() with the binary compare option is the only way to get case
sensitivity in Access.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 27 '08 #5
MLH
On Tue, 27 May 2008 16:56:25 -0500, "Rick Brandt"
<ri*********@hotmail.comwrote:
>MLH wrote:
>I've tried crit's like Like "*" & Chr$(78) & "*"

but they return strings with both N's and n's.
Forcing the uppercase characteristic of a given
letter of the alphabet may just not be possible in
a query. But I'm not giving up hope.

InStr() with the binary compare option is the only way to get case
sensitivity in Access.
Thanks Rick. OK, Option compare Binary in a procedure
until after I'm finished running the query, then set it back to
Option compare Text ==Is that the recommended way?
Jun 27 '08 #6
MLH
Oops...
Looking at the InStr HELP, I see. You're recommending this syntax...
MyPos = Instr(1, SearchString, SearchChar, 0)
.... the key point being the 0 value for the 4th argument. Thanks.
That is the most direct approach.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx
On Tue, 27 May 2008 16:56:25 -0500, "Rick Brandt"
<ri*********@hotmail.comwrote:
>MLH wrote:
>I've tried crit's like Like "*" & Chr$(78) & "*"

but they return strings with both N's and n's.
Forcing the uppercase characteristic of a given
letter of the alphabet may just not be possible in
a query. But I'm not giving up hope.

InStr() with the binary compare option is the only way to get case
sensitivity in Access.
Jun 27 '08 #7
On May 28, 9:28*am, MLH <C...@NorthState.netwrote:
On Tue, 27 May 2008 16:56:25 -0500, "Rick Brandt"

<rickbran...@hotmail.comwrote:
MLH wrote:
I've tried crit's like * *Like "*" & Chr$(78) & "*"
but they return strings with both N's and n's.
Forcing the uppercase characteristic of a given
letter of the alphabet may just not be possible in
a query. But I'm not giving up hope.
InStr() with the binary compare option is the only way to get case
sensitivity in Access.

Thanks Rick. OK, * Option compare Binary in a procedure
until after I'm finished running the query, then set it back to
Option compare Text *==Is that the recommended way?
SELECT *
FROM Customers
WHERE StrComp([First Name],[FirstName],0) = 0

successfully selects "ANTONIO" but not "Antonio" when the parameter
[FirstName] is passed as "ANTONIO".

Changing the Option Compare Default, in my opinion, is unnecessary and
I would be hesitant about doing so.

Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jochen Daum | last post by:
Hi ! If I have an input field <form ... method="post"> <input type="text" name="abc def"> </form>
9
by: msnews.microsoft.com | last post by:
Hello! I'm Jim by asp How can show "abc" in textbox when click one botton?
4
by: Jack | last post by:
Hello, By VBScript I can use this code Response.Write "ABC" How can I use JScript show "ABC"? Can you help me
1
by: srinu | last post by:
Hello, We had one webserver based on a linux machine. The website is fully function and designed by a different person. Now we moved the machine from one IP to another one. I changed the...
2
by: yourmallu | last post by:
Hi Friends, All we are knowing that we can get the element by document.getelementbyid("default_txtname").value. But If it is not on that page if i am taking header.ascx and placing text box...
6
by: Dick Watson | last post by:
I had a page that works when setup like this: === <form name="frmCalc" action=""> <script type="text/javascript"> function btnCalc_onclick(abc) { return "got here with " + abc; }
0
by: serge | last post by:
I have 2 SQL Enterprise Editions running SP2 and same collation. When i try to start database mirroring I get the following error message: "The remote copy of database "ABC" has not been...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.