Force upper case

G

Guest

I created a table in which I forced upper case in the "State" column. I then
wanted to create mailing labels, but the state initials revert to lower case
on the label. How do I force upper case in the mailing labels itself?
 
R

Rick Brandt

gailmt said:
I created a table in which I forced upper case in the "State" column.
I then wanted to create mailing labels, but the state initials revert
to lower case on the label. How do I force upper case in the mailing
labels itself?

All you did was apply a format for all caps on the table and those are not
propogated to queries and reports. Instead of using the field directly
use...

=UCase([State])
 
F

fredg

I created a table in which I forced upper case in the "State" column. I then
wanted to create mailing labels, but the state initials revert to lower case
on the label. How do I force upper case in the mailing labels itself?

You probably set the field's Format to Upper Case. All that does is
effect how the field contents is displayed. It does NOT actually store
the data in upper case. When you then use that data in another object
(i.e. a report), it is what is stored that is printed.

Either convert the table field to upper case using an Update query:

Update YourTable Set YourTable.[State] = UCase([State]);

or in the report use an unbound control.
Set it's Control Source to:
=UCase([State])
 
R

Robert

How would I accomplish the same thing but have only the first letter of each
word in the field capitalized? MTIA



fredg said:
I created a table in which I forced upper case in the "State" column. I
then
wanted to create mailing labels, but the state initials revert to lower
case
on the label. How do I force upper case in the mailing labels itself?

You probably set the field's Format to Upper Case. All that does is
effect how the field contents is displayed. It does NOT actually store
the data in upper case. When you then use that data in another object
(i.e. a report), it is what is stored that is printed.

Either convert the table field to upper case using an Update query:

Update YourTable Set YourTable.[State] = UCase([State]);

or in the report use an unbound control.
Set it's Control Source to:
=UCase([State])
 
F

fredg

How would I accomplish the same thing but have only the first letter of each
word in the field capitalized? MTIA

fredg said:
I created a table in which I forced upper case in the "State" column. I
then
wanted to create mailing labels, but the state initials revert to lower
case
on the label. How do I force upper case in the mailing labels itself?

You probably set the field's Format to Upper Case. All that does is
effect how the field contents is displayed. It does NOT actually store
the data in upper case. When you then use that data in another object
(i.e. a report), it is what is stored that is printed.

Either convert the table field to upper case using an Update query:

Update YourTable Set YourTable.[State] = UCase([State]);

or in the report use an unbound control.
Set it's Control Source to:
=UCase([State])


[ControlName] = StrConv([ControlName],3)

Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitaliztion depends upon usage, such as e. e.
cummings, abc, van den Steen.
Then some names can be capitalized in more than one manner, depending
upon personal preference, i.e. O'Connor and O'connor, McDaniels and
Mcdaniels, etc. are both correct.

You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.
 

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