ProperCase with Hyphens/Brackets in between (1 Viewer)

VilaRestal

';drop database master;--
Local time
Today, 18:08
Joined
Jun 8, 2011
Messages
1,046
Also, I don't like the idea of editing the data in the table while your developing and testing it. Only tie it to the table in that way when you're sure it's working how you want it. The test sub I initially had in place is the kind of thing you should be using. Only when you've tried a range of strings and are happy with what it's doing should you consider processing data in place with it.

So I would comment out the existing After_Update event code for now. To test it you could put an unbound textbox on the form and process its text in its after update event. Then there's no danger of screwing up data.
 
Last edited:

BBBryan

Registered User.
Local time
Today, 11:08
Joined
Nov 13, 2010
Messages
122
Thanks
This one works good now!
One thing - What is the false compared to nothing saying
s = AllCaseEachOfWord(s, "a", False)
I appreicate All you time and effort in Helping me.
I have learned something here

BBryan
 

VilaRestal

';drop database master;--
Local time
Today, 18:08
Joined
Jun 8, 2011
Messages
1,046
It's the parameter declared as
Private Function AllCaseEachOfWord(..., Optional ByVal blnUpper As Boolean = True)...

As false it means it will make the words lower-case (not Upper)
As true (or omitted, it defaults to true) it will make the words upper-case.
because of the repeated code
IIf(blnUpper, sU, sL)
within the function
If blnUpper then it replaces with the upper-case string, if not it replaces with the lower-case string

It might be better to replace that one function with two: one for upper, one for lower if the two methods deviate in the way they work as they might if we try to take into account whether the word is at the start of a sentence in the case of lowering the case. As it stands it's simpler being in one function with just the blnUpper switch.
 

BBBryan

Registered User.
Local time
Today, 11:08
Joined
Nov 13, 2010
Messages
122
I see now.
I have added some more words to the list
It works good when you know what it means...
Thanks again for all your help and effort
I am still have a lot to learn about Programming. But I Like it...

Thanks BBryan
 

VilaRestal

';drop database master;--
Local time
Today, 18:08
Joined
Jun 8, 2011
Messages
1,046
You're welcome. It's a whole new world. Enjoy exploring it ;)
 

Users who are viewing this thread

Top Bottom