>Here are two examples that would be ideal:
>
>1) The first letter of a specific field converting to a capital
Use the textbox's AfterUpdate event:
Private Sub textboxname_AfterUpdate()
If Len(Me!textboxname) > 0 Then
Me!textboxname = UCase(Left(Me!textboxname, 1) & Mid(Me!textboxname, 2)
End IF
End Sub
>2) The first letter in each word in a specific name field to convert to
>capitals (ie. Jay A. Smith)
Ummm... that's often not correct! Hans van der Hoorn and Ian MacDonald are
properly capitalized; Hans Van Der Hoorn and Ian Macdonald are not. Cathal
Macdonald might be though!
Again, use the AfterUpdate event. I check to see if the text is all lower case
and only change it if it is, trusting the user to have entered mixed case
correctly:
Private Sub textboxname_AfterUpdate()
If Len(Me!textboxname) > 0 Then
If StrComp(Me!textboxname, LCase(Me!textboxname), 0) = 0 Then
Me!textboxname = StrConv(Me!textboxname, vbProperCase)
End If
End If
End Sub
>3) In a memo field. The first letter in the field and the first letter of a
>word after a period in a sentence.
ouch. VERY substantial programming, with lots and lots of special cases
(proper names in the text, periods that aren't at the end of sentences, etc.)
Train your users in the proper use of the pinky finger on each hand... <g>
John W. Vinson [MVP]