capitalising 1st letters in "full name" textbox

Joz`

New member
Local time
Today, 23:22
Joined
Jul 29, 2004
Messages
5
hi and help pls.

i'm very new to the world of databases and programming. but for my first master piece i've gone slightly over the top....well i would have if i could overcome this problem.

i have a textbox on a form&tabel, and im tryin to get the first letter of both fore/surnames capitalised. i know you can do this with an input mask, while using two (2) text boxes. but i dont require two text boxes, one for each name. im tryin to get both names in one box, punctuated correctly (unlike my grammer :) ).

anyway.....any offers of knowledge???? pls :)
 
You would be advised to use two textboxes: forename and surname. This would satisfy database normalisation.

What you want, however, is ProperCase.


i.e.

Code:
Me.MyTextBox = StrConv(Me.MyTextBox, vbProperCase)
 
thanx.....but

thanx for the help, but where do i stick it?

Me.MyTextBox = StrConv(Me.MyTextBox, vbProperCase)

i'm thinking that "me" referes to the form/tabel "mytextbox" referes to the text box im using for the full name field. but wheres the code go?
 
In the AfterUpdate event of your textbox.

Actually, change it to:

Code:
If Not IsNull(Me.MyTextBox) Then Me.MyTextBox = StrConv(Me.MyTextBox, vbProperCase)
 
Nice 1

Thanx a million

10mins of scratching my head at what that meant, then a few trial an errors. an hey presto, u sorted my prob out

cheers ;)
 

Users who are viewing this thread

Back
Top Bottom