Would anybody be interested in a Function that changes upper case to proper case and takes care of names like McDonald, O’Meara, John Paul III, etc?
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Proper Case
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Proper Case
- This topic has 5 replies, 5 voices, and was last updated 23 years, 12 months ago.
Viewing 2 reply threadsAuthorReplies-
WSMarkJ
AskWoody Lounger -
WSShane Sargent
AskWoody Lounger -
Devinder
GuestMay 10, 2001 at 7:30 am #1783219Public Function Proper(anyValue As Variant) As Variant
‘ Accepts: a text value
‘ Purpose: converts first letter of each word to uppercase
‘ Returns: converted text valueDim i As Integer
Dim theString As String
Dim currChar As String
Dim prevChar As String
Dim prevChar2 As String
Dim prevChar3 As StringIf IsNull(anyValue) Then
Exit Function
End IfcurrChar = ” ”
prevChar = ” ”
prevChar2 = ” ”
prevChar3 = ” ”theString = CStr(anyValue)
For i = 1 To Len(theString) ‘Go through string char by char.
currChar = Mid(theString, i, 1) ‘Get the current character.Select Case prevChar ‘If previous char is letter,
‘this char should be lowercase.
Case “I”
If currChar = “I” And (prevChar2 = ” ” Or prevChar2 = “I”) Then
Mid(theString, i, 1) = UCase(currChar)
Else
Mid(theString, i, 1) = LCase(currChar)
End If
Case “c”
If i = 3 And prevChar2 = “M” Then
Mid(theString, i, 1) = UCase(currChar)
Else
Mid(theString, i, 1) = LCase(currChar)
End If
Case “‘”
If currChar = “s” Then
mid(theString, i, 1) = LCase(currChar)
End If
Case “A” To “Z”, “a” To “z”
Mid(theString, i, 1) = LCase(currChar)Case Else
Mid(theString, i, 1) = UCase(currChar)End Select
prevChar3 = prevChar2
prevChar2 = prevChar
prevChar = currCharNext i
Proper = CVar(theString)End Function
-
WSTomG
AskWoody LoungerMay 11, 2001 at 6:34 am #1783271Cool, you can also find similar code at http://www.mvps.org/access/
-
-
-
WSBrian Swann
AskWoody Lounger
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
13 minutes ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
6 hours, 18 minutes ago -
Best and easiest way to Split PST File (Awaiting moderation)
by
Jamesjackson0847
2 hours, 40 minutes ago -
Is it a bug or is it expected?
by
Susan Bradley
5 hours, 12 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
2 hours, 51 minutes ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
10 hours, 50 minutes ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
27 minutes ago -
Multiple Partitions?
by
CWBillow
1 hour, 7 minutes ago -
World Passkey Day 2025
by
Alex5723
18 hours, 26 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
1 day, 9 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
6 hours, 20 minutes ago -
Cached credentials is not a new bug
by
Susan Bradley
1 day, 14 hours ago -
Win11 24H4 Slow!
by
Bob Bible
1 day, 14 hours ago -
Microsoft hiking XBox prices starting today due to Trump’s tariffs
by
Alex5723
1 day, 11 hours ago -
Asus adds “movement sensor” to their Graphics cards
by
n0ads
1 day, 16 hours ago -
‘Minority Report’ coming to NYC
by
Alex5723
1 day, 12 hours ago -
Apple notifies new victims of spyware attacks across the world
by
Alex5723
2 days, 1 hour ago -
Tracking content block list GONE in Firefox 138
by
Bob99
2 days ago -
How do I migrate Password Managers
by
Rush2112
1 day, 8 hours ago -
Orb : how fast is my Internet connection
by
Alex5723
1 day, 10 hours ago -
Solid color background slows Windows 7 login
by
Alex5723
2 days, 12 hours ago -
Windows 11, version 24H2 might not download via Windows Server Updates Services
by
Alex5723
2 days, 11 hours ago -
Security fixes for Firefox
by
Susan Bradley
1 day, 11 hours ago -
Notice on termination of services of LG Mobile Phone Software Updates
by
Alex5723
2 days, 23 hours ago -
Update your Apple Devices Wormable Zero-Click Remote Code Execution in AirPlay..
by
Alex5723
3 days, 8 hours ago -
Amazon denies it had plans to be clear about consumer tariff costs
by
Alex5723
2 days, 23 hours ago -
Return of the brain dead FF sidebar
by
EricB
2 days, 10 hours ago -
Windows Settings Managed by your Organization
by
WSDavidO61
1 day, 13 hours ago -
Securing Laptop for Trustee Administrattor
by
PeachesP
15 hours, 58 minutes ago -
The local account tax
by
Susan Bradley
2 days, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.