Results 1 to 4 of 4
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776

    Joining First, middle, last name in a qry expression help

    HI all,
    I have attached a moch db and i am trying to do a full name concatenation with some If statements in it possibly? Not really sure. I put what i seek in memo on form open. Could someone take a look at it and let me know if possible and any ideas maybe? db is just a sample, very cut and clear. One Tbl, One Qry, and One Frm...and small data amount....

    Thanks
    Dave

    Contact.zip

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,402
    Had to create a UDF which had to go into a module.
    The query calls the UDF to get the proper format for the names.

    Contact-davegri-v01.zip

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    In addition to Daves solution, When entering names, here's a helpful function to format them in proper case. http://access.mvps.org/access/strings/str0008.htm

    When entering a middle name or initial, I usually test for the length. If it is 1 (just an initial) then I concatenate a "." on the end.

    Code:
    Private Sub MidName_AfterUpdate()
    
    
        Me.MidName = mxc(Me.MidName)
    
        If len(Me.MidName) = 1 then Me.MidName = Me.MidName & "."
    
    
    End Sub

  4. #4
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776
    Thank you all so much!! This is just so awsome... I am in awe
    Dave

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

Similar Threads

  1. Trim Middle name
    By Dean0_53 in forum Access
    Replies: 9
    Last Post: 02-01-2018, 09:50 AM
  2. Select from Middle of Data
    By mohanmoni in forum Queries
    Replies: 2
    Last Post: 02-04-2015, 12:59 PM
  3. Parsing Middle of String
    By OprEowyn in forum Queries
    Replies: 4
    Last Post: 02-20-2013, 10:53 PM
  4. Replies: 3
    Last Post: 05-08-2011, 12:55 PM
  5. More than one middle name
    By vorstopzolder in forum Access
    Replies: 5
    Last Post: 02-10-2011, 01:09 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