forcing uppercase

G

Guest

In my forms or tables, I can use the format property to make the data
displayed be uppercase, but it is not actually stored that way -- it is
stored how it is entered (either upper or lowercase). How do I force the
data to be stored as uppercase?
 
J

Jeff Boyce

Heidi

One way might be to use the BeforeUpdate event in your forms to change the
value:
Me!txtYourTextControl = UCase(Me!txtYourTextControl)

Are you aware that once you've converted some types of data, you will have
some real headaches ever getting it back? For example, if you store a
LastName value, and might ever want to use something like:

Dear [LastName]

in an Access (or Word) document, you will have problems handling names that
started out like:

O'Brien
MacDonald
van de Wigge

after you've forced them to all CAPS.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Jeff, that is perfect... thank you for the response. I appreciate you giving
me the heads up about recovering the data as you explained.

Jeff Boyce said:
Heidi

One way might be to use the BeforeUpdate event in your forms to change the
value:
Me!txtYourTextControl = UCase(Me!txtYourTextControl)

Are you aware that once you've converted some types of data, you will have
some real headaches ever getting it back? For example, if you store a
LastName value, and might ever want to use something like:

Dear [LastName]

in an Access (or Word) document, you will have problems handling names that
started out like:

O'Brien
MacDonald
van de Wigge

after you've forced them to all CAPS.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Heidi said:
In my forms or tables, I can use the format property to make the data
displayed be uppercase, but it is not actually stored that way -- it is
stored how it is entered (either upper or lowercase). How do I force the
data to be stored as uppercase?
 

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