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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Initial capital
I have a field which I want to have an initial capital - I know this can be
done by an input mask but I was wondering how it would be done with VBA? Some code in the Before Update property? Thanks for any help, Gavin |
#2
|
|||
|
|||
Initial capital
Take a look at the StrConv() Function.
-- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm Jeff Conrad's Access Junkie List: http://home.bendbroadband.com/conrad...essjunkie.html "gavin" wrote in message ... I have a field which I want to have an initial capital - I know this can be done by an input mask but I was wondering how it would be done with VBA? Some code in the Before Update property? Thanks for any help, Gavin |
#3
|
|||
|
|||
Initial capital
I will Lynn - I promise - but just in case I don't understand (this
newsgroup is called "getting stated, don't forget!) maybe you could give me a bit more of a clue :-) Regards, Gavin "Lynn Trapp" wrote in message ... Take a look at the StrConv() Function. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm Jeff Conrad's Access Junkie List: http://home.bendbroadband.com/conrad...essjunkie.html "gavin" wrote in message ... I have a field which I want to have an initial capital - I know this can be done by an input mask but I was wondering how it would be done with VBA? Some code in the Before Update property? Thanks for any help, Gavin |
#4
|
|||
|
|||
Initial capital
Public Function Pcase(strPassed As String) As String
'Convert into proper case string Pcase = StrConv(strPassed, vbProperCase) End Function Copy the above function in the code of the form or into a VBA module. Call it using a string : e.g. :: "the quick brown fox" it will return :: "The Quick Brown Fox" Ed Warren. "gavin" wrote in message ... I will Lynn - I promise - but just in case I don't understand (this newsgroup is called "getting stated, don't forget!) maybe you could give me a bit more of a clue :-) Regards, Gavin "Lynn Trapp" wrote in message ... Take a look at the StrConv() Function. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm Jeff Conrad's Access Junkie List: http://home.bendbroadband.com/conrad...essjunkie.html "gavin" wrote in message ... I have a field which I want to have an initial capital - I know this can be done by an input mask but I was wondering how it would be done with VBA? Some code in the Before Update property? Thanks for any help, Gavin |
#5
|
|||
|
|||
Initial capital
Hi Gavin,
What I should have said was, "Take a look at the StrConv() Function IN VBA HELP." I try to live by the old adage, "Catch a fish for a hungry man and you will provide him with a meal. Teach him to fish and you will feed him for a lifetime." Ed has provided a good example of it. Be aware that vbProperCase will not give what you want for a few problem situations -- the name "macdonald" will come out as "Macdonald" instead of "MacDonald". -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm Jeff Conrad's Access Junkie List: http://home.bendbroadband.com/conrad...essjunkie.html "gavin" wrote in message ... I will Lynn - I promise - but just in case I don't understand (this newsgroup is called "getting stated, don't forget!) maybe you could give me a bit more of a clue :-) Regards, Gavin "Lynn Trapp" wrote in message ... Take a look at the StrConv() Function. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm Jeff Conrad's Access Junkie List: http://home.bendbroadband.com/conrad...essjunkie.html "gavin" wrote in message ... I have a field which I want to have an initial capital - I know this can be done by an input mask but I was wondering how it would be done with VBA? Some code in the Before Update property? Thanks for any help, Gavin |
#6
|
|||
|
|||
Initial capital
"Ed Warren" wrote in message ... Public Function Pcase(strPassed As String) As String 'Convert into proper case string Pcase = StrConv(strPassed, vbProperCase) End Function Copy the above function in the code of the form or into a VBA module. Call it using a string : e.g. :: "the quick brown fox" it will return :: "The Quick Brown Fox" Ed, I am obviously doing something wrong because this isn't working for me. Where in the "code of he form" do I paste this? Regards, Gavin |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Initial capital in outline format | GeoBrooks | General Discussion | 1 | November 24th, 2005 12:53 AM |
Initial capital | gavin | New Users | 6 | September 11th, 2005 10:10 PM |
Convert to Symbols | Omar Menjivar | General Discussion | 7 | June 27th, 2005 07:32 PM |
Automatic initial capital letters | chash | Worksheet Functions | 2 | June 22nd, 2004 03:23 PM |
Autocorrect Initial Capital of sentence | KBS | General Discussion | 2 | June 10th, 2004 04:48 AM |