Re: Field to Upper Case

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Wed, 22 Jun 2005 15:15:01 -0700, Leslie
<Leslie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>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]
.



Relevant Pages

  • Re: Capatilization
    ... BruceM wrote: ... You can also format a control in which the text is entered. ... it will be displayed as upper case. ... If you had the Format property of the field in the table set to ">", ...
    (microsoft.public.access.forms)
  • Re: Signed 16 bit numbers in AD21161 and VisualDSP
    ... The first approach converts the number from 1.15 fractional format to 1.31. ... If your number is in internal memory, you can read the lower 16 bits (ignoring the upper 16) by reading from addr*2. ...
    (comp.dsp)
  • Re: change capitalize letters to lowercase
    ... The free Excel add-in "XL Extras" adds menu items to the Format ... menu that offers choices to change the text in the selection to: ... Upper, Lower, Proper, and Sentence case. ...
    (microsoft.public.excel.misc)
  • upper icons in help file form word - excel - access - do not work anymore
    ... I have Office 2002 with Windows XP Professioan Service Pack2. ... The format from the helpfile changed completely and the upper ...
    (microsoft.public.office.developer.automation)
  • Re: Field to Upper Case
    ... lower-case entered text to upper case. ... "John Vinson" wrote: ... > its Properties; click the Format tab. ...
    (microsoft.public.access.gettingstarted)