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  

Initial capital



 
 
Thread Tools Display Modes
  #1  
Old February 20th, 2006, 09:43 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 20th, 2006, 09:44 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 21st, 2006, 12:29 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 21st, 2006, 10:50 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 21st, 2006, 02:29 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 24th, 2006, 08:17 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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

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
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


All times are GMT +1. The time now is 06:15 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.