Upper/Lower Casing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a function that upper/lower cases data as it is entered, the problem
is that words like mcdonald show up as Mcdonald and not McDonald and o'reily
show up as O'reily not O'Reily is there any way of amending the code or some
new code that could fix this as at present I have to do it manually!

Thanks
 
This is the issue that is always discussed when people try to set the case.
I will never understand why anyone does this. I don't think I could type a
name without holding down the shift key for the first letter. Are there
really people out there that are too lazy to hit the shift key?

The only way to do this would be to build a table with all the exceptions
and update it often. As posted by someone yesterday (you'll have to do a
search to find it) this still does not cover instances where you might not
want one of those special words capitalized when used in a company name.

I'd recommend having your users learn to type.

Rick B
 
Julie said:
I have a function that upper/lower cases data as it is entered, the problem
is that words like mcdonald show up as Mcdonald and not McDonald and o'reily
show up as O'reily not O'Reily is there any way of amending the code or some
new code that could fix this as at present I have to do it manually!


You can try using
http://www.mvps.org/access/strings/str0008.htm

But, the only reliable way to get it right is to use the
Shift key during data entry. People's names are spelled and
capitalized in many different ways that do not follow any
rules, especially across national or cultural boundaries.
 
One of my favourite examples is that here in Ireland we usually write
'MacAuley', but Irish-Americans often write the same name as 'Macauley'. If
you record that as 'macauley' or 'MACAULEY' there is no programmatic way of
ever retrieving the preferred spelling.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Hi

I have a function that upper/lower cases data as it is entered, the problem
is that words like mcdonald show up as Mcdonald and not McDonald and o'reily
show up as O'reily not O'Reily is there any way of amending the code or some
new code that could fix this as at present I have to do it manually!

Thanks

In general, create a table of exceptions.
Then, in the Control's AfterUpdate event, do a DLookUp for that name
in the table. If it exists, give the user the option (in a message
box) to change the control's text to the other spelling, or leave it
as entered.

If you do use this method, remember to update the table as new names
are found.

And then there is no proper or improper method to capitalize a name.
It's a matter of personal preference... McDonald-Mcdonald,
O'Connor-O'connor are all correct.
 
The same is true of Macdonald and MacDonald, or McDonald or Mcdonald, or,
....

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Brendan Reynolds said:
One of my favourite examples is that here in Ireland we usually write
'MacAuley', but Irish-Americans often write the same name as 'Macauley'. If
you record that as 'macauley' or 'MACAULEY' there is no programmatic way of
ever retrieving the preferred spelling.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Well ... cultural differences come into play here. I think probably most
Irish people, and probably most Scottish people, too, would consider
Mcdonald and O'connor to be incorrect. So does my spelling checker, which
wants to correct them to McDonald and O'Connor, respectively. However, I
would not argue with anyone about the way they prefer to capitalize their
own name. I well remember the running battle I had with my teachers at
school when they wanted me to use the 'modern' Irish spelling of my name,
'MacRannail'. I insisted on using the old Irish spelling 'MacRaghnnail'.
After all, my family have been spelling our name that way for hundreds of
years, and it's *our* name, who the heck did they think they were, telling
me to change it? !:-)

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top