PDA

View Full Version : how can I Format data from a table in a text box



deustim
08-15-2011, 01:41 PM
Currently Data stored in a table is propagated to a several text boxes on a access form in the same format as located in the data table. Is there any way to take the text box data and format it, for example turn an all CAPS string into a Title Sentence without having to change the table data formating?

hansup
08-15-2011, 07:52 PM
Look at Access' help topic for the StrConv() function. Here's an example I ran in the Immediate Window.

Debug.Print StrConv("SCOOBY DOO", vbProperCase)
Scooby Doo

It could be useful for many situations, but might not adjust the case as you wish for every situation ...

Debug.Print StrConv("TWELVE O'CLOCK HIGH", vbProperCase)
Twelve O'clock High

deustim
08-16-2011, 07:44 AM
Thanks I think this provides a good starting point for me.

hansup
08-16-2011, 09:44 AM
Right. If StrConv() won't do everything you need, your challenge is daunting. For example, what should be the rules to tranform case for: "OLD MACDONALD'S FARM"; and "MACK THE KNIFE"?