Home All Groups Group Topic Archive Search About
Author
23 Feb 2005 11:14 PM
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

Author
23 Feb 2005 11:59 PM
fredg
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.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Author
24 Feb 2005 12:40 AM
DS
fredg wrote:
Show quote
> 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
Author
24 Feb 2005 1:23 AM
fredg
On Wed, 23 Feb 2005 19:40:41 -0500, DS wrote:

Show quote
> fredg wrote:
>> 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.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Author
24 Feb 2005 2:13 AM
DS
fredg wrote:
Show quote
> On Wed, 23 Feb 2005 19:40:41 -0500, DS wrote:
>
>
>>fredg wrote:
>>
>>>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

AddThis Social Bookmark Button