Proper Case

D

DS

I have a textbox, just one, on a form. I type info into it and transfer
it to another field. How would I get that first textbox to
automatically format to Proper Case, I see access can do lower case, it
can do upper case....I searched the net for a simple solution, but
everything I tried doesn't seem to work for whatever reason, perhaps
lack of experience on my part :)
Any suggestions would be appreciated.
Thanks
DS
 
F

fredg

I have a textbox, just one, on a form. I type info into it and transfer
it to another field. How would I get that first textbox to
automatically format to Proper Case, I see access can do lower case, it
can do upper case....I searched the net for a simple solution, but
everything I tried doesn't seem to work for whatever reason, perhaps
lack of experience on my part :)
Any suggestions would be appreciated.
Thanks
DS

On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)

Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitaliztion depends upon usage, such as e. e.
cummings, abc, van den Steen.
Then some names can be capitalized in more than one manner, depending
upon personal preference, i.e. O'Connor and O'connor, McDaniels and
Mcdaniels, etc. are both correct.

You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.
 
D

DS

fredg said:
I have a textbox, just one, on a form. I type info into it and transfer
it to another field. How would I get that first textbox to
automatically format to Proper Case, I see access can do lower case, it
can do upper case....I searched the net for a simple solution, but
everything I tried doesn't seem to work for whatever reason, perhaps
lack of experience on my part :)
Any suggestions would be appreciated.
Thanks
DS


On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)

Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitaliztion depends upon usage, such as e. e.
cummings, abc, van den Steen.
Then some names can be capitalized in more than one manner, depending
upon personal preference, i.e. O'Connor and O'connor, McDaniels and
Mcdaniels, etc. are both correct.

You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.
Thank You, I tried it and it doesn't seem to work...I need it to Update
as I type. I made a second control with the string in it and that seems
to work except I can't use the keyboard though. Maybe it needs to go on
another Event?
Thank You
DS
 
F

fredg

fredg said:
I have a textbox, just one, on a form. I type info into it and transfer
it to another field. How would I get that first textbox to
automatically format to Proper Case, I see access can do lower case, it
can do upper case....I searched the net for a simple solution, but
everything I tried doesn't seem to work for whatever reason, perhaps
lack of experience on my part :)
Any suggestions would be appreciated.
Thanks
DS

On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)

Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitaliztion depends upon usage, such as e. e.
cummings, abc, van den Steen.
Then some names can be capitalized in more than one manner, depending
upon personal preference, i.e. O'Connor and O'connor, McDaniels and
Mcdaniels, etc. are both correct.

You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.
Thank You, I tried it and it doesn't seem to work...I need it to Update
as I type. I made a second control with the string in it and that seems
to work except I can't use the keyboard though. Maybe it needs to go on
another Event?
Thank You
DS

No.. it doesn't need to go in another event. And it's not supposed to
update as you type. It changes the data in the field when you exit the
control, as it should.
 
D

DS

fredg said:
fredg said:
On Wed, 23 Feb 2005 18:14:11 -0500, DS wrote:


I have a textbox, just one, on a form. I type info into it and transfer
it to another field. How would I get that first textbox to
automatically format to Proper Case, I see access can do lower case, it
can do upper case....I searched the net for a simple solution, but
everything I tried doesn't seem to work for whatever reason, perhaps
lack of experience on my part :)
Any suggestions would be appreciated.
Thanks
DS

On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)

Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitaliztion depends upon usage, such as e. e.
cummings, abc, van den Steen.
Then some names can be capitalized in more than one manner, depending
upon personal preference, i.e. O'Connor and O'connor, McDaniels and
Mcdaniels, etc. are both correct.

You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.

Thank You, I tried it and it doesn't seem to work...I need it to Update
as I type. I made a second control with the string in it and that seems
to work except I can't use the keyboard though. Maybe it needs to go on
another Event?
Thank You
DS


No.. it doesn't need to go in another event. And it's not supposed to
update as you type. It changes the data in the field when you exit the
control, as it should.
Ok, Thanks..still a newie at this.
DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top