Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Function Proper (Access XP)

    In Excel there is a function "Proper". If I want to apply this function to data in a Access table what will the syntax be and can any one assist whether it will be the same in Sql.

    TIA

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Function Proper (Access XP)

    In queries and in the control source of text boxes etc. you can use the StrConv function with 3 as second argument.

    For example in a query:

    ProperName: StrConv([LastName],3)

    or in the control source of a text box on a form or report:

    =StrConv([LastName],3)

    Remark: if you use 1 as second argument, the string is converted to upper case, and if you use 2, the string is converted to lower case.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function Proper (Access XP)

    Thanks Hans

  4. #4
    New Lounger
    Join Date
    Jul 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function Proper (Access XP)

    Further to this post, I have just inherited a database with the Surname field totally filled with capitals.

    I want to change all these entries to Proper Case, ie: 1st letter in caps with the rest in lower case.

    I have tried:
    UCase(Left([Surname],1)) & LCase(Mid([Surname],2))
    but am left with problem surnames such as: De Souza, McLean, O'Neill, Della-Porta which all end up in lower case.

    Can you suggest a workaround for this please.

    Thanks

    RonRichmond

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Function Proper (Access XP)

    Welcome to Woody's Lounge!

    See <post#=309,766>post 309,766</post#> by <!profile=MarkD>MarkD<!/profile>, and take note of the remarks at the end.

  6. #6
    New Lounger
    Join Date
    Jul 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function Proper (Access XP)

    Thanks for the very quick response Hans, and the link to Mark's post.
    I am sure that will do the trick.

    Cheers

Posting Permissions

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