Results 1 to 3 of 3
  1. #1
    ntambomvu is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Johannesburg south africa
    Posts
    91

    function to format a name

    Hello Chaps!! ( and ladies !!)
    i am creating a data table of my customer names.
    Is there a function which will automatically format the name according to a given set of paramaters?
    for example I would like the table to capture the name entered after removing any punctuation, It must
    capitalize the whole name and remove any double spaces. Futhermore after removing any periods the name


    must have a space between initials--- Etc etc
    all suggestions greatfully recieved
    best regards
    Fred

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    would like the table to capture the name entered after removing any punctuation
    use the replace function
    It must capitalize the whole name
    use the UCASE function
    remove any double spaces
    use the replace function
    after removing any periods the name must have a space between initials
    use the replace function to replace periods with spaces

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    The first and most important thing, here, is that your customers' names should not be entered into a single Field! The names should be broken up into the components (Last Name, First Name, Middle Initial, Title Suffix) and each entered into their own, separate, Field.

    This would solve most, if not all of your problem, here, and since you're just now creating your Table, shouldn't be a problem.

    If you need to have the entire name displayed, such as John Q. Public, at a later date, in a Report, for instance, you can easily do this by Concatenating the various Fields.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Format Function Not Working
    By gameemaster in forum Queries
    Replies: 3
    Last Post: 05-13-2017, 02:28 PM
  2. Now Function Custom Format
    By DrJohn in forum Access
    Replies: 9
    Last Post: 03-16-2016, 09:51 AM
  3. Replies: 1
    Last Post: 03-18-2015, 09:17 AM
  4. Format in Dlookup function
    By tpcervelo in forum Forms
    Replies: 6
    Last Post: 10-22-2010, 10:23 AM
  5. Replies: 3
    Last Post: 08-24-2010, 09:26 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