All Caps Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to run a query to find all my text that has been entered in ALL
CAPS. Is there an expression I can use?

Thanks for the help.
 
Not with normal query criteria methods in Jet. You'd need to write a
function that "reads" a text string to see if all characters in it are in
Caps (using the Ascii values of the characters) and then returns a True or
False accordingly. You could call such a function from a query.

The trick is that an all Caps text string also can have characters that are
not caps -- e.g., these types of characters:
(space)
!
@
#
$
%
&
(
)
:
;
'
"
,
 
Hi,

I would like to run a query to find all my text that has been entered in ALL
CAPS. Is there an expression I can use?

Actually there is:

SELECT <whatever>
FROM <your table>
WHERE StrComp([fieldname], UCase([fieldname]), 0) = 0;


John W. Vinson[MVP]
 
Elegant, John!

--

Ken Snell
<MS ACCESS MVP>

John Vinson said:
Hi,

I would like to run a query to find all my text that has been entered in
ALL
CAPS. Is there an expression I can use?

Actually there is:

SELECT <whatever>
FROM <your table>
WHERE StrComp([fieldname], UCase([fieldname]), 0) = 0;


John W. Vinson[MVP]
 
Back
Top