I would like to have a field in our table programmatically create the first letter of a word as Upper Case and the balance of each word in lower case.
ie: Skiing Is Fun
not: SKIING IS FUN or skiing is fun
Thanks
I would like to have a field in our table programmatically create the first letter of a word as Upper Case and the balance of each word in lower case.
ie: Skiing Is Fun
not: SKIING IS FUN or skiing is fun
Thanks
the ProperCase method will cap first letter, but not sure for a phrase - you will want to look that up.
decide whether to implement this as data is entered - or post entry in an update query applied to all records
if ProperCase caps every word, rather than just the first word then:
* look up and get to know Instr In String to search for the first " "
* Left() method to get word to left of first " "
and then proper case.
Hope this helps.
Thank you for your idea, but it does not work for what I would like to do below.
I would like to have a field in our table programmatically create the first letter of a word in a phrase as Upper Case (Capital) and the other part of each word in lower case as the user types the data
ie: Skiing Is Fun In Alberta
not: SKIING IS FUN IN ALBERTA or skiing is fun in alberta
Thanks
this is impractical, even after saying it twice.
for all practical purposes, assume that it can't be done AS the user is typing. you're better off to change inputs when the record is entered, that way code has time to run. and it should only take one line of code, because the help menu says:vbProperCase 3 Converts the first letter of every word in string to uppercase.
The outline I provide will definitely work. It applies ProperCase to the first word. (not the entire phrase) The key is to find just the first word. You do that by finding the first space. Have done it, it works.
In essence you first break apart the phrase, propercase the first word, and then rejoin the phrase.
It is brute force however and so feasibly there is a more elegant method but it isn't at the tip of my typing fingers.
hope this helps.