Results 1 to 5 of 5

Thread: help with Foematting uppercase

Threaded View

  1. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: help with Foematting uppercase

    Quote Originally Posted by RayComp
    Thanks. Trouble is that the input can be any city and is stored in access database.

    So input is random and need to force the input to display capital letter after the space.
    That's no trouble... As Martin stated just replace hard coded "new york" (which was done only for demonstration as most of our samples) with some variable you might have.
    Or you may even wrapp it in a function:
    VB Code:
    1. Public Function ConvertToProperCase(ByVal strValue As String) As String
    2.     ConvertToProperCase = StrConv(strValue, vbProperCase)
    3. End Function
    4.  
    5. 'usage:
    6. Private Sub Command1_Click()
    7. Dim sOldValue$, sNewValue$
    8.  
    9.     sOldValue = "new york"
    10.     sNewValue = ConvertToProperCase(sOldValue)
    11.     Debug.Print sNewValue
    12.  
    13. End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width