Results 1 to 3 of 3

function to format a name

  1. #1
    ntambomvu is online now Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Johannesburg south africa
    Posts
    38

    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
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    6,313
    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
    2,787
    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, 01:28 PM
  2. Now Function Custom Format
    By DrJohn in forum Access
    Replies: 9
    Last Post: 03-16-2016, 08:51 AM
  3. Replies: 1
    Last Post: 03-18-2015, 08:17 AM
  4. Format in Dlookup function
    By tpcervelo in forum Forms
    Replies: 6
    Last Post: 10-22-2010, 09:23 AM
  5. Replies: 3
    Last Post: 08-24-2010, 08: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
  •  
Tech Forums: Microsoft Office Forums