Title Case-Must Share With All

  • Thread starter Thread starter Linda
  • Start date Start date
L

Linda

Hello everyone!

Well with asking around, I finally got a simple version of
an expression to convert many words in one field to Title
Case Just Like This. I'm still new at this and all the
answers I was getting wasn't getting the picture. Someone
had to actually set it up for me and send it so that I
could "see". So since I can't paste a picture of the QBE
I will explain in words the picture. Not that no one
wouldn't understand, but maybe for that one person like
me, very new at it all.

1-Under the Objects column choose TABLE and set one up
with 2 fields FirstName and LastName - now save it as
NamesList; (add a couple of names in it in lowercase, and
maybe one that has 3 first names(all in the same field)
2-Under the Objects column choose QUERY then NEW then
DESIGN VIEW and double click on NamesList and close that
menu;
3-Now, you should have the Table NamesList in the top half
of the query and in the bottom half the columns with the
lines: Field, Table, Sort, Show etc.
4-From the top half in Table NamesList click-on and drag
and drop "FirstName" on the "Field" line in the 1st
column.
5-From the top half Table NamesList click-on and drag and
drop "LastName" on the "Field" line in the 2nd column.

6-Go back to the 1st column on the field line that now has
FirstName and right after the "e" of nam"e" type :strconv
([FirstName],3)

SO it should look exactly like this:
FirstName:strconv([FirstName],3)

7- Same thing for the second column, but instead of
FirstName it will be LastName

SO it should look exactly like this:
LastName:strconv([LastName],3)

Now RUN the query!

I know this was long,but I hope it helps someone!

Thanks to all those here that helped me!
L.
 
Linda,

Thanks for posting this information. However, I don't want to rain on
your parade, but I am sorry to say that this won't work, as you will see
if you try to follow the steps you have outlined. There are two points...

1. FirstName: StrConv([FirstName],3) will fail because you are trying
to create a calculated field whose alias is the same as the name of an
existing field. It will work if you use something else as the alias,
for example...
TitleFirstName: StrConv([FirstName],3)

2. In any case, I would not recommend this approach, as it does not
change the data the way you want, it only changes the appearance of it
at the time the query is used. I would suggest in this case to use an
Update Query so the data itself is actually converted to proper case.
To do this, you would do steps 1-5 in your method, and then do this...
- make it an Update Query (select Update from the Query menu)
- in the Update To row of the query design grid, put
StrConv([FirstName],3) in the FirstName column, and
StrConv([LastName],3) in the LastName column.
- run the query

--
Steve Schapel, Microsoft Access MVP

Hello everyone!

Well with asking around, I finally got a simple version of
an expression to convert many words in one field to Title
Case Just Like This. I'm still new at this and all the
answers I was getting wasn't getting the picture. Someone
had to actually set it up for me and send it so that I
could "see". So since I can't paste a picture of the QBE
I will explain in words the picture. Not that no one
wouldn't understand, but maybe for that one person like
me, very new at it all.

1-Under the Objects column choose TABLE and set one up
with 2 fields FirstName and LastName - now save it as
NamesList; (add a couple of names in it in lowercase, and
maybe one that has 3 first names(all in the same field)
2-Under the Objects column choose QUERY then NEW then
DESIGN VIEW and double click on NamesList and close that
menu;
3-Now, you should have the Table NamesList in the top half
of the query and in the bottom half the columns with the
lines: Field, Table, Sort, Show etc.
4-From the top half in Table NamesList click-on and drag
and drop "FirstName" on the "Field" line in the 1st
column.
5-From the top half Table NamesList click-on and drag and
drop "LastName" on the "Field" line in the 2nd column.

6-Go back to the 1st column on the field line that now has
FirstName and right after the "e" of nam"e" type :strconv
([FirstName],3)

SO it should look exactly like this:
FirstName:strconv([FirstName],3)

7- Same thing for the second column, but instead of
FirstName it will be LastName

SO it should look exactly like this:
LastName:strconv([LastName],3)

Now RUN the query!

I know this was long,but I hope it helps someone!

Thanks to all those here that helped me!
L.
 
Will take note of that Steve, thanks for the info wasn't
aware of the appearance thing. Naahhh, don't worry, I
need more than that to burst my balloons! (smile)

Thanks again!!!
L.
-----Original Message-----
Linda,

Thanks for posting this information. However, I don't want to rain on
your parade, but I am sorry to say that this won't work, as you will see
if you try to follow the steps you have outlined. There are two points...

1. FirstName: StrConv([FirstName],3) will fail because you are trying
to create a calculated field whose alias is the same as the name of an
existing field. It will work if you use something else as the alias,
for example...
TitleFirstName: StrConv([FirstName],3)

2. In any case, I would not recommend this approach, as it does not
change the data the way you want, it only changes the appearance of it
at the time the query is used. I would suggest in this case to use an
Update Query so the data itself is actually converted to proper case.
To do this, you would do steps 1-5 in your method, and then do this...
- make it an Update Query (select Update from the Query menu)
- in the Update To row of the query design grid, put
StrConv([FirstName],3) in the FirstName column, and
StrConv([LastName],3) in the LastName column.
- run the query

--
Steve Schapel, Microsoft Access MVP

Hello everyone!

Well with asking around, I finally got a simple version of
an expression to convert many words in one field to Title
Case Just Like This. I'm still new at this and all the
answers I was getting wasn't getting the picture. Someone
had to actually set it up for me and send it so that I
could "see". So since I can't paste a picture of the QBE
I will explain in words the picture. Not that no one
wouldn't understand, but maybe for that one person like
me, very new at it all.

1-Under the Objects column choose TABLE and set one up
with 2 fields FirstName and LastName - now save it as
NamesList; (add a couple of names in it in lowercase, and
maybe one that has 3 first names(all in the same field)
2-Under the Objects column choose QUERY then NEW then
DESIGN VIEW and double click on NamesList and close that
menu;
3-Now, you should have the Table NamesList in the top half
of the query and in the bottom half the columns with the
lines: Field, Table, Sort, Show etc.
4-From the top half in Table NamesList click-on and drag
and drop "FirstName" on the "Field" line in the 1st
column.
5-From the top half Table NamesList click-on and drag and
drop "LastName" on the "Field" line in the 2nd column.

6-Go back to the 1st column on the field line that now has
FirstName and right after the "e" of nam"e" type :strconv
([FirstName],3)

SO it should look exactly like this:
FirstName:strconv([FirstName],3)

7- Same thing for the second column, but instead of
FirstName it will be LastName

SO it should look exactly like this:
LastName:strconv([LastName],3)

Now RUN the query!

I know this was long,but I hope it helps someone!

Thanks to all those here that helped me!
L.
.
 
Back
Top