I am buiding a small database in Access 2007 and one of the fields is
"FirstName" I have Autocrrect enabled, and when I check the control's
properties it says "Allow AutoCorrect:Yes" but when I enter names with
lowercase first letters, they are left uncorrected. What am I not doing
right?
Assuming that Access knows the proper capitalization of every possible
first name. The Autocorrect feature will correct the capitalization of
names *in Access's current dictionary*; it is not intended to
capitalize proper names, since names don't typically occur in
dictionaries.
If you want to capitalize any entry in a particular textbox
(txtFirstName let's say) I'd recommend using VBA code like the
following in the textbox's AfterUpdate event. The code allows the user
to control the capitalization of names like "McNiel" and doesn't
mistakenly correct it to "Mcniel":
Private Sub txtFirstName_AfterUpdate()
' check to see if the entry is all lower case
If StrComp(Me!txtFirstName, LCase(Me!txtFirstName), 0) = 0 Then
' correct the initial capital using the builtin strConv function
Me!txtFirstName = StrConv(Me!txtFirstName, vbProperCase)
End If
End Sub