From large to small letters

D

Dimitris

Hello,
In a field of a table the entries are either on capital letter or small
letters or capital and small letters together. I want all data in that field
to turn to small letters only. (as you were typing with no Caps Lock)
Can someone please help me?

Thank you
Dimitris
 
J

John Spencer

Take a look at the LCase function. You can use that in a query

Field: LittleMyField: LCase([MyField])

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
D

Daryl S

Dimitris -

Back up your database before changing data.

To change existing data, run an update query where you set the field(s) to
lower case:

LCase([FieldName])

for each field you want to do this to (use your fieldnames).


If you don't care about how they are stored, just what they look like in a
query or report, then use the lower-case function in the query or report.
Instead of just pulling [FieldName], pull [LCase([FieldName]).


To prevent further data from being entered in mixed-case, use the
BeforeUpdate event of the data entry form to change all fields to lowercase,
using the same LCase function.
 
J

John W. Vinson

Hello,
In a field of a table the entries are either on capital letter or small
letters or capital and small letters together. I want all data in that field
to turn to small letters only. (as you were typing with no Caps Lock)
Can someone please help me?

Thank you
Dimitris

You can use an Update query, using the builtin StrConv() function:

UPDATE mytable
SET fieldname = StrConv([fieldname], 1)
WHERE [fieldname] IS NOT NULL;

You can type Ctrl-G to open the VBA window (to get at the correct help file),
F1 to open Help, and search for strConv for a description of the program. The
help will say to use strConv(value, vbLowerCase), which works in VBA code but
not in a query; the numeric value of vbLowerCase is 1, hence my suggested
query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top