Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2022
    Posts
    17

    VBA for Proper Case

    Good Morning,
    I am trying to create an AfterUpdate event that will change my field "CITY" to proper case.
    I've tried #StrConv([CITY],3)#
    The more I try to fix it, the more confused I get. Can someone help?
    Frank

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,990
    The # shouldn't be part of the code!
    This will convert a string to proper case
    Code:
    ?StrConv("HElLo woRlD",3)
    Hello World
    This query will display a text field T in proper case
    Code:
    SELECT id, T, StrConv([T],3) AS Expr1
    FROM Table1;
    The original data isn't converted with the above. To do so, use an update query

    Code:
    UPDATE Table1 SET T = StrConv([T],3);
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Proper Case and Exceptions
    By bcarter17 in forum Access
    Replies: 31
    Last Post: 09-24-2021, 01:58 PM
  2. Proper Case
    By jonboy in forum Access
    Replies: 9
    Last Post: 04-05-2021, 01:49 AM
  3. Replies: 4
    Last Post: 04-28-2019, 07:19 PM
  4. Change text case from upper to proper case
    By s.nolan in forum Access
    Replies: 1
    Last Post: 12-02-2015, 10:56 AM
  5. Proper Case or Capitalization help
    By tshirttom in forum Programming
    Replies: 5
    Last Post: 03-23-2012, 10:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums