If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Custom Formats
Hi
Can anyone help me create a custom format for address fields - I would like to be able to enter the address and it automatically change to Sentence Case - easy for one word but can't seem to find the answer if there are two or three words - such as Apple Tree Road Thanks Bib |
#2
|
|||
|
|||
bibby wrote:
Hi Can anyone help me create a custom format for address fields - I would like to be able to enter the address and it automatically change to Sentence Case - easy for one word but can't seem to find the answer if there are two or three words - such as Apple Tree Road Thanks Bib Thats' not sentence case, that's proper case and the strConv function can do that for you. strConv("apple tree road", vbProperCase) = "Apple Tree Road" -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
On Fri, 27 May 2005 18:58:19 +0000, bibby
wrote: Hi Can anyone help me create a custom format for address fields - I would like to be able to enter the address and it automatically change to Sentence Case - easy for one word but can't seem to find the answer if there are two or three words - such as Apple Tree Road A Format proprety isn't capable of doing this task; you need VBA code. Note that Sentence Case will be WRONG for some addresses: I've got a friend who lives on McCormick Lane for example! Try putting the following code in the AfterUpdate event of a textbox on the Form you're using to update this table. (Yes, you need a form; no, table datasheets don't have any usable events): Private Sub txtAddress_AfterUpdate() ' Only process entries which are all in lower case If StrComp(Me!txtAddress, LCase(Me!txtAddress), vbBinary) = 0 Then Me!txtAddress = StrConv(Me!txtAddress, vbProperCase) End If End Sub This will convert "apple tree road" to "Apple Tree Road", but will leave "van Slyke Avenue" and "MAC Street" and "McClintock Lane" alone since they're already in mixed case. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Formats | Amanda Cooper | General Discussion | 2 | May 11th, 2005 07:27 PM |
Custom Number Formats and system | Josh O. | Worksheet Functions | 3 | August 27th, 2004 01:49 AM |
unknown formats being applied | Biff | General Discussion | 2 | July 12th, 2004 07:48 PM |
How do you format custom fields designed for custom contact forms? | Debalan | Contacts | 4 | May 19th, 2004 11:54 PM |
Custom # formats | Keyur | Worksheet Functions | 1 | February 13th, 2004 02:41 PM |