Thread: Remove CAPS
View Single Post
  #2  
Old June 2nd, 2010, 03:02 PM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Remove CAPS

On Wed, 02 Jun 2010 12:44:37 GMT, "ladybug via AccessMonster.com"
u21071@uwe wrote:

One possibility would be in the control's AfterUpdate event:
Me.Description.Value = StrConv(Me.Description.Value, vbProperCase)
or perhaps:
Me.Description.Value = UCase$(Left$(Me.Description.Value ,1)) &
LCase$(Mid$(Me.Description.Value ,2)
Often these exercises become counter-productive since some sentences
naturally have some capitalization.

How about testing for all uppercase in the control's BeforeUpdate
event:
if ucase$(Me.Description.Value)=Me.Description.Value then
msgbox "Yo! Not all uppercase!", vbCritical
Cancel = true 'forces them to change it.
end if

-Tom.
Microsoft Access MVP


I have a text box in a form called Description. I do not want users to be
able to enter in here with all CAPS. They have been instructed, but there
are still a few that occasionaly forget. I played around with the and in
Format, but the description can be fairly long and using these will cut off
some of the info.

Is there any other code that will remove the CAPS if entered that way?
However, I would prefer for it to keep the CAP in the beginning of a sentence.


Thank you!