Field to Upper Case

G

Guest

I would like to define a text field in a table to convert anything typed into
it to Upper Case. Can I do this at the Table-Field level, or do I need to do
this at the Forms-Update database level? (e.g. "UUUUU" to force to upper
case in the format field on the table definition -- sorry if I'm old-school).

I would prefer that the field auto-format any text entered to upper case. I
couldn't find anything in the help files.

Simple question in Office Access 2003, why do not the Text fields have any
drop-down formatting options, like the numeric, date, etc.?

Cheers,
Leslie
 
G

gls858

Leslie said:
I would like to define a text field in a table to convert anything typed into
it to Upper Case. Can I do this at the Table-Field level, or do I need to do
this at the Forms-Update database level? (e.g. "UUUUU" to force to upper
case in the format field on the table definition -- sorry if I'm old-school).

I would prefer that the field auto-format any text entered to upper case. I
couldn't find anything in the help files.

Simple question in Office Access 2003, why do not the Text fields have any
drop-down formatting options, like the numeric, date, etc.?

Cheers,
Leslie

If you put the text field on a form or report you can highlight
the field and right click, select properties. You will find a tab called
format that will give you a drop down of all the Fonts and other formatting
options.

gls858
 
V

Van T. Dinh

Set the InputMask of the TextBox on the Form to ">" (without the
double-quotes).

If there is any possibility of users entering the data using the
DatasheetView of the Table, you should also set the same InputMask for the
Field in the DesignView of the Table.

HTH
Van T. Dinh
MVP (Access)
 
J

John Vinson

I would like to define a text field in a table to convert anything typed into
it to Upper Case. Can I do this at the Table-Field level, or do I need to do
this at the Forms-Update database level? (e.g. "UUUUU" to force to upper
case in the format field on the table definition -- sorry if I'm old-school).

Well... you're also unkind to users if the fields are actually free
text such as names or addresses. All upper case is HARD TO READ.
I would prefer that the field auto-format any text entered to upper case. I
couldn't find anything in the help files.

You can use a table format of

just the greater-than sign - to *display* the data in upper case.
However, this does not change the way the data is stored, just how
it's displayed. To actually be able to type "foo" and have "FOO"
stored in the table, you must use a Form for data entry (since tables
don't have usable events). You can put the following code in the
textbox's AfterUpdate event:

Private Sub textboxname_AfterUpdate()
Me!textboxname = UCase(Me!textboxname)
End Sub

using your actual control name of course.
Simple question in Office Access 2003, why do not the Text fields have any
drop-down formatting options, like the numeric, date, etc.?

Form Textboxes do. Right mouseclick the textbox on the form and view
its Properties; click the Format tab. There's a Format property for
which you can use a dropdown providing many options, or enter your own
custom format.

John W. Vinson[MVP]
 
G

Guest

John (and others),

Thanks for your help. Yes, I am specifically looking to convert any
lower-case entered text to upper case. Ideally, I would like this to be the
case on any forms I might create (which is doable) as well as if someone uses
the Design View to enter data into the table (which doesn't have the
formatting on the field definitions). In the old days (DBII, DBIII+, etc.),
I seem to recall you used to set a "mask" or in MSFT terms a "format" of
"UUUUUU" on a field definition to force it to upper case. Using the ">"
isn't going to work for me because I want the data stored in upper case, not
necessarily just displayed in upper case.

Per John's concern re: all uppercase, it is only on certain key fields
(where I know I will be building report queries) that I want to force to
Upper Case.

Thanks again for all your help. I think I have the tools I need to be on my
way.

Cheers,
Leslie
 

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

Similar Threads


Top