How do I force upper case in an Access field in a form or a query.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've entered names, addresses, city, & state in Upper and Lower case.
I want to export a mailing list to an Excel file to send to a mailing house.
The Post Office prefers all UPPER CASE. I found an input mask syntax (>)
that is supposed to force characters to upper case, but can't get it to work.
Does it go in the Input Mask in the Table Design?
 
Why don't you just force the uppercase in code:

Sub txtYourField_AfterUpdate()
Me.txtYourField = UCase(Me.txtYourField)
End Sub

For existing data, run an update query:

UPDATE [YourTable] SET [YourTable].YourField = UCase([YourField]);

--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Arvin Meyer said:
For existing data, run an update query:

UPDATE [YourTable] SET [YourTable].YourField = UCase([YourField]);

Changing the underlying data is drastic not appropriate! It's easy to
format as uppercase as required. Converting the raw data would make it
extremely hard to re-create the original format. The Post Office may
prefer uppercase but, say, newsgroup readers CONSIDER IT TO BE
SHOUTING.

If the OP requires a custom view they can create a VIEW (i.e. Stored
Query) and format the data there.

Jamie.

--
 
Changing the underlying data is drastic not appropriate! It's easy to
format as uppercase as required. Converting the raw data would make it
extremely hard to re-create the original format. The Post Office may
prefer uppercase but, say, newsgroup readers CONSIDER IT TO BE
SHOUTING.

A Requirements Analysis by the original poster determines what is
appropriate. Since neither you or I have any idea what the underlying data
looks like, I suspect it is not appropriate for us to comment on whether or
not it may be appropriate. BTW, Mailing lists are rarely published in
newsgroups, so I doubt that one needs to consider that as a requirement.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Hi,
put the character > into the format line (first line) of the format rider
(first rider) of the properties window of the field in your form/report:
Open your form/report in draft view
Click the field you want to display in capital letters
Open the properties window (symbol with a hand holding a sheet)
Click on the leftmost rider tab (the one that has the caption "format")
The first line deals with format - insert the character ">" (without
quotation marks!)
Save the form
When you open it the next time in display mode, the contents of this field
will be displayed in capital letters

Fritz
 
Arvin Meyer said:
A Requirements Analysis by the original poster determines what is
appropriate. Since neither you or I have any idea what the underlying data
looks like, I suspect it is not appropriate for us to comment on whether or
not it may be appropriate. BTW, Mailing lists are rarely published in
newsgroups, so I doubt that one needs to consider that as a requirement.

Another consideration...

I have links in many of my apps to back end databases that are case
sensitive. If I display all caps when the underlying data is not all caps
then this can lead to filtering and searching problems. I cannot control
the consistency of existing data, but I CAN control the consistency of new
entries by forcing all caps. I usually do this in the key events so the
user simply sees all caps as they are typing. Changing the entry to all
caps when they exit the control would accomplish the same result, but I
just think it's more intuitive to force the case while typing.
 
Another consideration...

I have links in many of my apps to back end databases that are case
sensitive. If I display all caps when the underlying data is not all caps
then this can lead to filtering and searching problems. I cannot control
the consistency of existing data, but I CAN control the consistency of new
entries by forcing all caps. I usually do this in the key events so the
user simply sees all caps as they are typing. Changing the entry to all
caps when they exit the control would accomplish the same result, but I
just think it's more intuitive to force the case while typing.

Exactly. But to be fair, Access is not case sensitive, and we have no idea,
beyond the poster's stated goals, what is to be done with it. In any case, I
think neither one of us needs to waste much time with the other
possibilities.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Arvin Meyer said:
A Requirements Analysis by the original poster determines what is
appropriate. Since neither you or I have any idea what the underlying data
looks like, I suspect it is not appropriate for us to comment on whether or
not it may be appropriate.

My impression was the OP was referring to the 'front end' i.e.
formatting. Your UPDATE SQL makes permanent changes in the 'back end'.
IMHO changing the underlying data for the convenience of front end
formatting is not appropriate.

Jamie.

--
 
Back
Top