make data upper case

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

I have a field in my table that should only store values
in upper case.

I would like any input automatically to be converted to
upper case asnd then saved as such.

How do I make that happen?
 
Why?

As in "why do you need upper case stored?"

Access can use the UCase() function in queries and reports to output upper
case. But storing upper case makes it very difficult to convert back to
proper case.

Which of the following letter headers would you rather receive?

DEAR JOHN

or

Dear John

<g>

--
Good luck

P.S. The UCase() function could also be used in an update query to convert
a field to all upper case.

Jeff Boyce
<Access MVP>
 
-----Original Message-----
Why?

As in "why do you need upper case stored?"

Access can use the UCase() function in queries and reports to output upper
case. But storing upper case makes it very difficult to convert back to
proper case.

Which of the following letter headers would you rather receive?

DEAR JOHN

or

Dear John

<g>

--
Good luck

P.S. The UCase() function could also be used in an update query to convert
a field to all upper case.

Jeff Boyce
<Access MVP>

.
 
Well it is because some of the fields I am using is to be
transferred to an old inventory system - and this system
only accepts upper case.... and somehow I just found it
easie just to have it in upper case so I dont have to
worry about converting before transfering data
 
JJ

If you ONLY need to transfer data from your Access db to the "upper case
only" system, no problems.

If you need to use the data for more than this single purpose, store it in
proper case, and create a query to export/transfer data. Use the UCase()
function in the query to convert the data to upper case during the transfer.
 
which then brings me back to the original question...

can I automatically make data in my table upper case?

Like specify ">" in the input format - but that just only
accepts upper case - it doesn't convert lower to upper
case.
 
JJ said:
which then brings me back to the original question...

can I automatically make data in my table upper case?

Like specify ">" in the input format - but that just only
accepts upper case - it doesn't convert lower to upper
case.

When I need this I prefer to use the KeyPress event to force the *entry* of
all data to caps. It makes the conversion as the user is typing and
doesn't care what they do with the shift key.

KeyAscii = Asc(UCase(Chr(KeyAscii)))

To convert existing data you would need to use an Update query along the
lines of...

Update YourTableName
Set YourFieldName = UCase([YourTableName]![YourFieldName])
 
Back
Top