A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Changing from capital to small letters



 
 
Thread Tools Display Modes
  #1  
Old January 30th, 2006, 11:19 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Hello I have a table in which there is a field LNAME in which last names
have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris


  #2  
Old January 30th, 2006, 11:32 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

try:

StrConv(strPassed, vbProperCase)



Ed Warren

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last names
have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris



  #3  
Old January 31st, 2006, 12:27 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Dimitris,
Just an minor addition to Ed's correct response. It's the best you can
do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last names
have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris



  #4  
Old January 31st, 2006, 09:19 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Thank you for your answers.
I just can't figure where to write it.
I made a querie and wrote it at the SQL view but wasn;t accepted.
Please tell me where to write it. What steps should I do?
Thank You
Dimitris


"Al Camp" wrote in message
...
Dimitris,
Just an minor addition to Ed's correct response. It's the best you can
do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last names
have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris





  #5  
Old January 31st, 2006, 11:05 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Open a new query window in design view.
Add the table with the field of interest
add the field LNAME
in the next box over add the following
LnameProperCase: StrConv([LNAME], vbProperCase)
run the query to see the results.

If after you see what the code does to the fields, and you like it, and you
want to change the stored data.
Then
change the query type to update
copy the code: StrConv([LNAME], vbProperCase) into the updateto box under
the LNAME field, run the query.

Ed Warren

"Dimitris" wrote in message
...
Thank you for your answers.
I just can't figure where to write it.
I made a querie and wrote it at the SQL view but wasn;t accepted.
Please tell me where to write it. What steps should I do?
Thank You
Dimitris


"Al Camp" wrote in message
...
Dimitris,
Just an minor addition to Ed's correct response. It's the best you can
do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last names
have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris







  #6  
Old January 31st, 2006, 01:17 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Ed,
As far as I know, queris don't recognize the visual basic constants, so you
have to specify the actual value.

Therefore StrConv([LNAME], vbProperCase) should be StrConv([LName],3)



"Ed Warren" wrote in message
...
Open a new query window in design view.
Add the table with the field of interest
add the field LNAME
in the next box over add the following
LnameProperCase: StrConv([LNAME], vbProperCase)
run the query to see the results.

If after you see what the code does to the fields, and you like it, and
you want to change the stored data.
Then
change the query type to update
copy the code: StrConv([LNAME], vbProperCase) into the updateto box under
the LNAME field, run the query.

Ed Warren

"Dimitris" wrote in message
...
Thank you for your answers.
I just can't figure where to write it.
I made a querie and wrote it at the SQL view but wasn;t accepted.
Please tell me where to write it. What steps should I do?
Thank You
Dimitris


"Al Camp" wrote in message
...
Dimitris,
Just an minor addition to Ed's correct response. It's the best you
can do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last
names have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris









  #7  
Old January 31st, 2006, 02:12 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Yes you are correct replace the constant vbProperCase with the number 3

Thanks,

Ed Warren

"John Spencer" wrote in message
...
Ed,
As far as I know, queris don't recognize the visual basic constants, so
you have to specify the actual value.

Therefore StrConv([LNAME], vbProperCase) should be StrConv([LName],3)



"Ed Warren" wrote in message
...
Open a new query window in design view.
Add the table with the field of interest
add the field LNAME
in the next box over add the following
LnameProperCase: StrConv([LNAME], vbProperCase)
run the query to see the results.

If after you see what the code does to the fields, and you like it, and
you want to change the stored data.
Then
change the query type to update
copy the code: StrConv([LNAME], vbProperCase) into the updateto box
under the LNAME field, run the query.

Ed Warren

"Dimitris" wrote in message
...
Thank you for your answers.
I just can't figure where to write it.
I made a querie and wrote it at the SQL view but wasn;t accepted.
Please tell me where to write it. What steps should I do?
Thank You
Dimitris


"Al Camp" wrote in message
...
Dimitris,
Just an minor addition to Ed's correct response. It's the best you
can do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last
names have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it
will become: Smith
Is it possible?

Thank you
Dimitris











  #8  
Old January 31st, 2006, 02:16 PM
Bob Miller Bob Miller is offline
Senior Member
 
First recorded activity by OfficeFrustration: May 2005
Posts: 358
Default

Place this function in a module:
Function Proper(Pr)
Proper = StrConv(Pr, vbProperCase)
End Function

Then you can put this:
LName=Proper([LNAME])
in a query field.

Quote:
Originally Posted by Dimitris
Thank you for your answers.
I just can't figure where to write it.
I made a querie and wrote it at the SQL view but wasn;t accepted.
Please tell me where to write it. What steps should I do?
Thank You
Dimitris


"Al Camp" wrote in message
...
Dimitris,
Just an minor addition to Ed's correct response. It's the best you can
do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last names
have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it will
become: Smith
Is it possible?

Thank you
Dimitris


  #9  
Old January 31st, 2006, 04:43 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

Thank you all,
It worked fine, I am very happy about this.
Only one issue which has to do with the Greek grammar and it won't make
sense if I explain it. I just have to do this. After using the code you told
me I have to change the last letter of some names. To stay at my first
example "SMITH" became "Smith" but how can I change now the "h" at the end
of "Smith" with another letter. I need to change ALL the letters "h" at THE
END of names only.
So in my mind it's something like: Wherever a name ends with "h" change it
with "c" for example. Well in Greek we have 2 possibilities for a letter so
I need to change it to the other one, that is why I need this.
Thank you in advance
Dimitris


"Ed Warren" wrote in message
...
Yes you are correct replace the constant vbProperCase with the number 3

Thanks,

Ed Warren

"John Spencer" wrote in message
...
Ed,
As far as I know, queris don't recognize the visual basic constants, so
you have to specify the actual value.

Therefore StrConv([LNAME], vbProperCase) should be StrConv([LName],3)



"Ed Warren" wrote in message
...
Open a new query window in design view.
Add the table with the field of interest
add the field LNAME
in the next box over add the following
LnameProperCase: StrConv([LNAME], vbProperCase)
run the query to see the results.

If after you see what the code does to the fields, and you like it, and
you want to change the stored data.
Then
change the query type to update
copy the code: StrConv([LNAME], vbProperCase) into the updateto box
under the LNAME field, run the query.

Ed Warren

"Dimitris" wrote in message
...
Thank you for your answers.
I just can't figure where to write it.
I made a querie and wrote it at the SQL view but wasn;t accepted.
Please tell me where to write it. What steps should I do?
Thank You
Dimitris


"Al Camp" wrote in message
...
Dimitris,
Just an minor addition to Ed's correct response. It's the best you
can do for automating the solution to your poblem
Be aware though, that names like...
MCCARTHY
would come out as
Mccarthy
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Dimitris" wrote in message
...
Hello I have a table in which there is a field LNAME in which last
names have been entered with capitol letters. For example: SMITH.
I want to change them to small letters except the first one, so it
will become: Smith
Is it possible?

Thank you
Dimitris













  #10  
Old January 31st, 2006, 04:59 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Changing from capital to small letters

So in my mind it's something like: Wherever a name ends with "h" change it with "c"
for example. Well in Greek we have 2 possibilities for a letter so I need to change
it to the other one, that is why I need this.
Thank you in advance
Dimitris


IIf(Right([TestString], 1) = "h", Left([TestString], Len([TestString]) - 1) & "c",
[TestString])

Tom Lake


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing danish letters æøå LTJ General Discussion 0 June 29th, 2005 02:52 PM
how is the last name McKee spelled typed in all capital letters? lewisusa New Users 5 June 24th, 2005 06:04 PM
Letters gets changed when copied from PDF Document Ponnurangam General Discussion 14 November 24th, 2004 03:39 PM
excel - changing upper case letters into lower case letters BJorg Worksheet Functions 4 February 16th, 2004 08:40 AM
Formula for all Capital Letters Tami Worksheet Functions 2 September 24th, 2003 02:48 PM


All times are GMT +1. The time now is 11:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.