Capital Letters at the Start

  • Thread starter Thread starter Fishster
  • Start date Start date
F

Fishster

Guest
Hi all,

I am new to this game, so please bear with me...

I am creating a form in my database and would like to know if there is a way I can default each starting letter of my surname and address fields with a capital (but leave the rest in lower case)?
I feel that it looks more professional.

Many thanks for any help.

Mark
 
Last edited:
Hey Fishster,

Here's an example of what you can do. Maybe in the AfterUpdate event of your name control. This will do what your asking.

Me.ControlName = StrConv(Me.ControlName, vbProperCase)

HTH,
Shane
 
I agree with ShaneMan but I would use the BeforeUpdate event.
 
ShaneMan said:
Me.ControlName = StrConv(Me.ControlName, vbProperCase)

This does not work with all surnames.

MacStooge would show as Macstooge and O'Brien will show as O'brien
You'll need to Create another Table (with these corrections) and some code to lookup and populate the Control.

This site has a work around for that problem. Goto number 136

http://www.helenfeddema.com/access.htm
 
Last edited:
ThreeCrow said:
This does not work with all surnames.

MacStooge would show as Macstooge and O'Brien will show as O'brien
You'll need to Create another Table (with these corrections) and some code to lookup and populate the Control.

This site has a work around for that problem. Goto number 136

http://www.helenfeddema.com/access.htm

You don't need another table, this can be done with code, examples have been posted here
 
You don't need another table, this can be done with code, examples have been posted here

Me.ControlName = StrConv(Me.ControlName, vbProperCase)

This Code although wonderful, can not tell the difference between a word and a proper name. To the Code "Mack" and "MacStooge" are just words.
But in reallity "Mack" is the word, "MacStooge" is a proper name.

I think folks would want thier name in proper text. For the Code to work you would have to put a space between the "c" and "S", That would show as "Mac Stooge". This is not the proper name, "MacStooge" is the proper name.

Even in addresses proper text crops in. "115 LaMont Road", shouldn't be "115 La Mont Road". The Code will work fine for "227 Snowball Street".

But if your intent is to omit or misspell some Irish, Scottish, and French names in your dataBase, than have at it. I took it that Fishster wanted to do it proper.

Also the Code should be put into the Before Update Event.
 
I didn't mean the code on this post but "here" being this forum, there is code available that will differentiate between Mac Mc Obrien Mackee etc. Having a separate table means you have enter every known possible discrepancy to start with
 
didn't mean the code on this post but "here" being this forum,
You don't need another table, this can be done with code, examples have been posted here
Didn't have my "mEANiNG CoNVErTOR swItch oN"

Oh! sorry yes I did, I did have "mEANiNG CoNVErTOR swItch oN"
switched on.

Would seem that there was not enough data to convert to anything meaningful.



This is what Rich is probably referring to....
Thank Dave will take a look myself.
 

Users who are viewing this thread

Back
Top Bottom