Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there anyway to display text no matter how the user enters it? 1

Status
Not open for further replies.

testkitt2

Technical User
Apr 28, 2004
193
US
Hello all...
I have several users accessing a DB where there is no real control on how the DB will display the data. What I mean is this... I want every first letter of each word to be in caps.
Yes, you can use ">" (without quotes) in the format section.. but that makes everything display in uppercase.
I've tried "input format" but could only get the first word to go into Caps and the rest in lowercase.
Most of the users at work like, for whatever reason, to leave Caps lock on their keyboards. What I want is no matter how the user types the data, access will force each first letter in a word to be in Caps and the rest in lowercase.
Any suggestions whether it be a VB code... or anything else is greatly appreciated.

Thank you
JZ


Testkitt2
 
The search and FAQ options are your friends. :) FAQ

Hope this helps. Have Fun!
 
Thanks Thenolos
I've search and did not find exactly what I needed. There are FAQ's that show how to convert only first word strings not something like " The Progressive Hose Company " each word starts in a Cap letter.

Thanks anyway
JZ

Testkitt2
 

Hey thanks again Thenolos
Maybe I can use this code after all... but I need to know where and how to insert code... Pls help
Code:
Me.Text0.Value = StrConv([Text0], vbProperCase)
Thanks
JZ



Testkitt2
 
Try the AfterUpdate property of the textbox. Go to the events tab of the properties window and click the "..." next to the AfterUpdate combo box. Select the option to code your own procedure.

A window will pop up that says something like:

Code:
Sub Command1_AfterUpdate

End Sub
[code]

Change that to include the code formatted to match the details of your textbox.


[code]
Sub Command1_AfterUpdate

Me.YourTextboxName.Value = StrConv([YourTextboxName.Value], vbProperCase)

End Sub

Now close the window, save your form and try it out...

Let me know what happens.

 
Sorry... last post had a dumb TGML error on my part, should have read:

--

Code:
Sub Command1_AfterUpdate

End Sub

Change that to include the code formatted to match the details of your textbox.


Code:
Sub Command1_AfterUpdate

Me.YourTextboxName.Value = StrConv([YourTextboxName.Value], vbProperCase)

End Sub

---
 
HI Thenolos
I replaced the "Text0" with the name of the textbox and got this...
Code:
Me.Description.Value = StrConv([Description]), vbProperCase
And it works great.
Thanks again
JZ

Testkitt2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top