Results 1 to 2 of 2

Thread: Caps

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Posts
    62

    Caps

    Hello to all,

    I want to capitalize the first letter of every word. The problem is if some fields are null, it fails.

    example
    VB Code:
    1. Private Sub Name()
    2. Dim strFullName As String
    3.  
    4. strFullName = IIf(Not IsNull(rstLast).Value, Cap(Trim(rstLast).Value, "") _
    5.               & ", " & IIf(Not IsNull(rstFirst).Value), _
    6.               Cap(Trim(rstFirst).Value), "") _
    7.               & " - " & IIf(Not IsNull(rstTitle).Value, _
    8.               Cap(Trim(rstTitle).Value), "")
    9.  
    10. End Sub
    thanks

  2. #2

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