Chr(34) & strIn & 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(strIn, 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 an Control's AfterUpdate event:
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, and some words can be capitalized or not,
depending upon usage i.e. "The city's main street is Main Street."
Hope this has helped.
--
Fred
Please reply only to this newsgroup.
I do not reply to personal e-mail.
iain said:
thanks again guys.
thats working great now.
can you point me in the right direction for how to
incorporate the Lookup table for exceptions?
Iain
-----Original Message-----
Iain,
You could do an Update Query. If you are updating field
Publisher, put the
following in the Update To row of the Update query:
StrConv(Publisher, 3)
Note that what this function does is capitalize the first
character after a
space, so names like MACDONALD would be converted to
Macdonald. You might
have to do a little manual cleanup.
--
Cheryl Fischer
Law/Sys Associates
Houston, TX
thanks guys - thats the badger.
is there a way of applying this to existing records
universally?
cheers,
Iain
-----Original Message-----
The function you want for conversion to proper case is:
StrConv(Me!Publisher, 3)
The argument, 3, signifies conversion to proper case
--
Cheryl Fischer
Law/Sys Associates
Houston, TX
message
also, i've sussed how to force upper or lower case
when
fields are populated, using...
Private Sub Publisher_AfterUpdate()
Me!Publisher = LCase(Me!Publisher)
End Sub
on After Update.
but what should LCase or UCase be replaced with to
force
Proper Case?
Cheers,
Iain
-----Original Message-----
Hi,
Can anyone let me know if there is a function within
Access to change upper case to lower case
automatically?
Cheers,
Iain
.
.
.
.