Capitalize the first letter in each word

C

Chi

Hi,

I created a report from the table that imported from the internet. Somehow
all the patient names are capitalized. Ex: SUE TRAN

In my report, I would like the patient's first name and last name will only
be capitalized in the first letter.

Ex: SUE will be Sue
TRAN will be Tran

Thanks
Chi
 
J

John Spencer

Take a look at the strConv function

StrConv([YourNameField],3)

You can use that in a query or you can use
= StrConv([YourNameField],3)
as the source for a control
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
M

Marshall Barton

Chi said:
Hi,

I created a report from the table that imported from the internet. Somehow
all the patient names are capitalized. Ex: SUE TRAN

In my report, I would like the patient's first name and last name will only
be capitalized in the first letter.

Ex: SUE will be Sue
TRAN will be Tran


Use the StrConv function (see VBA Help for details)

E.g. a text box expression could be:
=StrConv([name field], 3)

Note that in this case the text box must **not** be named
the same as the field in the expression.
 
C

Chi

Hi John and Marshall,

Thank you so much for your responds!

The lastname and first name fields converted correctly. However, the Address
field has an error after using the StrConv function.

For example: 2305 ROLAND DR

Please help

Appreciate
Chi


John Spencer said:
Take a look at the strConv function

StrConv([YourNameField],3)

You can use that in a query or you can use
= StrConv([YourNameField],3)
as the source for a control
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Chi said:
Hi,

I created a report from the table that imported from the internet. Somehow
all the patient names are capitalized. Ex: SUE TRAN

In my report, I would like the patient's first name and last name will
only
be capitalized in the first letter.

Ex: SUE will be Sue
TRAN will be Tran

Thanks
Chi
 
J

John Spencer

And what is the ERROR? Did you get the wrong result (what was it), no
result, an error message, #error# in the cell?

You can see your data and screen. We can't.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Chi said:
Hi John and Marshall,

Thank you so much for your responds!

The lastname and first name fields converted correctly. However, the
Address
field has an error after using the StrConv function.

For example: 2305 ROLAND DR

Please help

Appreciate
Chi


John Spencer said:
Take a look at the strConv function

StrConv([YourNameField],3)

You can use that in a query or you can use
= StrConv([YourNameField],3)
as the source for a control
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Chi said:
Hi,

I created a report from the table that imported from the internet.
Somehow
all the patient names are capitalized. Ex: SUE TRAN

In my report, I would like the patient's first name and last name will
only
be capitalized in the first letter.

Ex: SUE will be Sue
TRAN will be Tran

Thanks
Chi
 
C

Chi

Hi John,

Sorry,

I entered StrConv([Address1], 3) in Address's control source and got
"#error" in the report at Address box.



Thanks
Chi

John Spencer said:
And what is the ERROR? Did you get the wrong result (what was it), no
result, an error message, #error# in the cell?

You can see your data and screen. We can't.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Chi said:
Hi John and Marshall,

Thank you so much for your responds!

The lastname and first name fields converted correctly. However, the
Address
field has an error after using the StrConv function.

For example: 2305 ROLAND DR

Please help

Appreciate
Chi


John Spencer said:
Take a look at the strConv function

StrConv([YourNameField],3)

You can use that in a query or you can use
= StrConv([YourNameField],3)
as the source for a control
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Hi,

I created a report from the table that imported from the internet.
Somehow
all the patient names are capitalized. Ex: SUE TRAN

In my report, I would like the patient's first name and last name will
only
be capitalized in the first letter.

Ex: SUE will be Sue
TRAN will be Tran

Thanks
Chi
 
J

John Spencer

In the control source you should have
= StrConv([Address1],3)

The NAME of the control cannot be Address1 since that will cause an error
and you must have Address1 in the record source.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Chi said:
Hi John,

Sorry,

I entered StrConv([Address1], 3) in Address's control source and got
"#error" in the report at Address box.



Thanks
Chi

John Spencer said:
And what is the ERROR? Did you get the wrong result (what was it), no
result, an error message, #error# in the cell?

You can see your data and screen. We can't.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Chi said:
Hi John and Marshall,

Thank you so much for your responds!

The lastname and first name fields converted correctly. However, the
Address
field has an error after using the StrConv function.

For example: 2305 ROLAND DR

Please help

Appreciate
Chi


:

Take a look at the strConv function

StrConv([YourNameField],3)

You can use that in a query or you can use
= StrConv([YourNameField],3)
as the source for a control
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Hi,

I created a report from the table that imported from the internet.
Somehow
all the patient names are capitalized. Ex: SUE TRAN

In my report, I would like the patient's first name and last name
will
only
be capitalized in the first letter.

Ex: SUE will be Sue
TRAN will be Tran

Thanks
Chi
 

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