UPPER- abd lower-case automatic formatting upon input.

T

tehllama

I'm wishing to have the input in certain fields automatically made
UPPER- or lower-case but I'm either not understanding the Help files
or I'm doing something silly.
I've put a > and a < in the Format fields for the appropriate fields
in Tables | Design View but no avail.
Can anyone help, please?
TIA.
 
T

tehllama

I'm wishing to have the input in certain fields automatically made
UPPER- or lower-case but I'm either not understanding the Help files
or I'm doing something silly.
I've put a > and a < in the Format fields for the appropriate fields
in Tables | Design View but no avail.
Can anyone help, please?
TIA.
If you meant "control" instead of "field", then you can put this in the
"after_update" event of a control on a form:

Me.myControlName = StrConv(Me.myControlName, vbUpperCase)

You can use ProperCase if you want first letter of each word capitalized, or
LowerCase if you want all lower case.

Hope that helps,
CW
I'm afraid it doesn't - or I'm not understanding again.

Tables | name_of_database | Design View | Field Name of "postcode" and
a DataType of Text | in the Format line I've tried using a > and a <
and then adding records, but what I thought would automatically
convert the input to upper-case isn't working.

If I would have to use your suggestion, why is there present the > and
< pair of options?
 
G

Gina Whipp

What version of Access? What you have done should work but not as you are
entering, it chages upon exit of the field.
 
J

John Spencer

FORMAT controls the way the data is presented. It does not do anything to
the way the data is stored.

You can use the INPUT MASK on a control to force all upper or all lower case
letters. You must also use the second argument to force the item to be
stored that way.

Input Mask: >CCCCCCC;0

Would allow you to input up to 7 characters, change them all to uppercase as
you entered them, and store them as upper case letters. I'm not sure that
you actually need the ";0" at the end.
 
F

fredg

I'm afraid it doesn't - or I'm not understanding again.

Tables | name_of_database | Design View | Field Name of "postcode" and
a DataType of Text | in the Format line I've tried using a > and a <
and then adding records, but what I thought would automatically
convert the input to upper-case isn't working.

If I would have to use your suggestion, why is there present the > and
< pair of options?

Do NOT do this in the table.
Tables are for data storage, not for data entry!
Tables do not have events. Forms's do!
Create a FORM that you use for data entry.
Then follow CW's method. Place the code in the [PostCode] AfterUpdate
event. If writing code is new to you, post back on how to write code,
but you must first create the form.
 
Top