473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Capitalizing first letter of each work

Hi all,

How do you capitalize the first letter of each word in a field. I can format
the field to UPPER case the last name of a person, but I can't UPPER case
just the first letter of each name. tia

Dwight
Nov 13 '05 #1
4 5103
This link should help you - http://www.mvps.org/access/strings/str0005.htm

On Sun, 8 Aug 2004 01:40:40 -0500, "Dwight" <ds******@comcast.net> wrote:
Hi all,

How do you capitalize the first letter of each word in a field. I can format
the field to UPPER case the last name of a person, but I can't UPPER case
just the first letter of each name. tia

Dwight


Nov 13 '05 #2
"Dwight" <ds******@comcast.net> wrote in message news:<dJ********************@comcast.com>...
Hi all,

How do you capitalize the first letter of each word in a field. I can format
the field to UPPER case the last name of a person, but I can't UPPER case
just the first letter of each name. tia

Dwight


Try: StrConv([MyField], vbProperCase)

Note that StrConv requires a string so use IIf or some other means to exclude Nulls.

James A. Fortune
Nov 13 '05 #3
http://groups.google.com/groups?q=ca...com.com&rnum=2
"Dwight" <ds******@comcast.net> wrote in message
news:dJ********************@comcast.com...
Hi all,

How do you capitalize the first letter of each word in a field. I can format the field to UPPER case the last name of a person, but I can't UPPER case
just the first letter of each name. tia

Dwight

Nov 13 '05 #4
James Fortune wrote:
"Dwight" <ds******@comcast.net> wrote in message news:<dJ********************@comcast.com>...
Hi all,

How do you capitalize the first letter of each word in a field. I can format
the field to UPPER case the last name of a person, but I can't UPPER case
just the first letter of each name. tia

Dwight

Try: StrConv([MyField], vbProperCase)

Note that StrConv requires a string so use IIf or some other means to exclude Nulls.

James A. Fortune


A good way would be to write a function to wrap it, e.g.

Function ProperCase(pvarText As Variant) As Variant
If IsNull(pvarText) Then
ProperCase = Null
Else
ProperCase = StrConv(pvarText, vbProperCase)
End If
End Function

That way, if null is passed in then null is returned, rather than a zero
length string, which may upset some table that doesn't allow zero length
strings.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on...
1
by: Patrick | last post by:
I am trying to get "first-letter" to work inline withing an anchor. Actually I have not been able to get it to work within an <a> tag whether inline, linked, or embedded. Using IE6 service pack 1....
3
by: news.individual.net | last post by:
Hi! Can I capitalize the first letter of the first paragraph without using a special class for that <p> ? I tried it with this: body > p:first-child:first-letter { font-size: 270%;
1
by: Marc Verdonck | last post by:
First: I have some troubles in access, some fields needs to begin with a Capital letter. Example: louiselaan need to be Louiselaan. How can I become this? Second: I'm exporting my database to...
2
by: Prisy | last post by:
Is it possible to have the text of the first-letter in an <asp:button> underlined? I was able to do the following to get the first letter underlined: <STYLE type="text/css">...
9
by: sovht | last post by:
System: Intel, Windows XP Pro, SP2 IDE: VC++ 6.0 Problem: *Very* simple program to create a MessageBox only ever displays the first character of the given string. I checked the spec for the...
3
by: wbosw | last post by:
I have a string " Hello World ", I've reversed the string to " olleH dlroW " now I would like to change the position of the Capitalized letters to Olleh Dlrow. By the way I do not want to...
4
by: zcabeli | last post by:
Hi all, i'm currently struggling to perform the above mentioned replacement. i already know how to catch the first letter in each word and determined if it's regular or capital. however, i...
2
by: whodgson | last post by:
The following code accepts a string from the user and swaps the first and last letters in each word. It prints out the original string incorrectly by dropping off the first letter of the first word....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.