473,395 Members | 1,823 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,395 software developers and data experts.

Capatalise the first letter of every word

Is there a simple way to capatalise the first letter of every word
typed into a textbox on a form. Someone told me to use "Proper" but not
sure if this is correct or how and where to use it.

Please can someone help.
Many thanks in advance!

Nov 13 '05 #1
2 2830
si************@gmail.com wrote:
Is there a simple way to capatalise the first letter of every word
typed into a textbox on a form. Someone told me to use "Proper" but not
sure if this is correct or how and where to use it.

Please can someone help.
Many thanks in advance!

In your AfterUpdate event for the textbox you can use StrConv(). Ex:
Me.Text0 = StrConv(Me.Text0,vbProperCase)

There may be times that one would want to have upper case. Ex: ABC
Company. You could create a global variable for the form under the
Option Explicit/Option Compare statements.
Dim blnCompany As Boolean
and in the OnCurrent event enter something like
blnCompany = False
and in the AfterUpdate event enter
If Me.NewRecord And Not blnCompany Then
'proper case it only at 1st time of entry
'if this is a new record. If editting an existing
'record, let the op enter whatever
Me.Text0 = StrConv(Me.Text0,vbProperCase)
End If
blnCompany = True
so that the first time the value is entered it will change the value to
a proper case if required but it can be overwritten later on.
Nov 13 '05 #2
si************@gmail.com wrote:
Is there a simple way to capatalise the first letter of every word
typed into a textbox on a form. Someone told me to use "Proper" but not
sure if this is correct or how and where to use it.

Please can someone help.
Many thanks in advance!

In your AfterUpdate event for the textbox you can use StrConv(). Ex:
Me.Text0 = StrConv(Me.Text0,vbProperCase)

There may be times that one would want to have upper case. Ex: ABC
Company. You could create a global variable for the form under the
Option Explicit/Option Compare statements.
Dim blnCompany As Boolean
and in the OnCurrent event enter something like
blnCompany = False
and in the AfterUpdate event enter
If Me.NewRecord And Not blnCompany Then
'proper case it only at 1st time of entry
'if this is a new record. If editting an existing
'record, let the op enter whatever
Me.Text0 = StrConv(Me.Text0,vbProperCase)
End If
blnCompany = True
so that the first time the value is entered it will change the value to
a proper case if required but it can be overwritten later on.
Nov 13 '05 #3

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

Similar topics

5
by: Andrew James | last post by:
Gentlemen, I'm running into a problem whilst testing the parsing of a language I've created with TPG . It seems that for some reason, TPG balks when I try to parse an expression whose first...
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...
0
by: simonmarkjones | last post by:
Is there a simple way to capatalise the first letter of every word typed into a textbox on a form. Someone told me to use "Proper" but not sure if this is correct or how and where to use it. ...
7
by: teo | last post by:
hallo, I need to extract a word and few text that precedes and follows it (about 30 + 30 chars) from a long textual document. Like the description that Google returns when it has found a...
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
8
by: babyangel43 | last post by:
Hello, I have a query set up in Access. I run it monthly, changing "date of test". I would like this query to be merged with a Word document so that the cover letter is created in Word, the fields...
6
by: pj | last post by:
Hi, I 'm currently writing a program that performs transliteration (i.e., converts greek text written using the english alphabet to "pure" greek text using the greek alphabet) as part of my...
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.