Thanks all.
Does anyone know a way to do this without writing Visual Basic? I am pretty
clueless in that area.
Follow these instructions and you should be all set.
Make a new table.
Field: [ID] AutoNumber Indexed No Duplicates
Field: [ExceptName] Text
TableName: tblExceptions
Enter as many known name exceptions as you can.
====
Copy and Paste this function into a new module.
*** Some of the longer lines may be incorrectly wrapped due to your
mail reader.***
Public Function ConvExceptions(StringIn As String) As String
' Will find exceptions to Proper Case capitalization of names.
On Error Resume Next
If DCount("*", "tblExceptions", "[ExceptName] = " & Chr(34) & StringIn
& Chr(34) & "") > 0 Then
Dim intResponse As Integer
Dim strFind As String
strFind = DLookup("[ExceptName]", "tblExceptions", "[ExceptName] =
" & Chr(34) & StringIn & Chr(34) & "")
intResponse = MsgBox(strFind & vbCrLf & " is an exception name." &
vbCrLf & " Accept the above capitalization? Y/N ?", vbYesNo,
"Exception found!")
If intResponse = vbYes Then
ConvExceptions = strFind
Exit Function
End If
End If
ConvExceptions = StrConv(StringIn, 3)
End Function
======
Call it from a Query:
Exp:ConvExceptions([FieldName])
Set the criteria for [FieldName] to
Is Not Null
Be prepared to respond to the message box if an exception is found.
Or use it in a Control's AfterUpdate event to check whwn new names are
added:
If Not IsNull([ThisField]) Then
[ThisField] = ConvExceptions([ThisField])
End If
Add new names to the exceptions table as they occur.
Also remember that there are multiple correct capitalizations of
names, O'Connor and O'connor are both correct, depending upon the
individual preference, and some words can be capitalized or not,
depending upon usage i.e. "The city's main street is Main Street."