Results 1 to 3 of 3
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    copy and paste part of a field

    Hi

    not sure if this is possible but thought I'd ask

    Have been given a table with 5400 records

    fields are:

    number
    mlink
    surname
    index
    inscription

    the table has no unique fields and no index

    The person who created the table placed the surname in the inscription field in capitals ie TOMES, Tom Fredk 3.2.37 a 76, Jessie Mary 3.1.56 a 96


    where TOMES is the surname

    is there any way to copy the TOMES part and paste it into the surname field

    ie at the moment I have

    PLot Number Index Mlink Surname Inscription

    Tc 1001 8m n3 TRIPP, Edward Hill



    I want it to have TRIPP in the Surname field

    Can this be done using vba or SQL??

    I did think of creating a copy of the table under another name and then use an update query to update the surname field from the inscription field and then to reduce it's length but that seemed a bit clumsy.

    I've attached a copy of the table should anyone care to look

    thanks

    Ian
    Attached Files Attached Files

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    See if this helps.

    First, I created a query to filter out records that obviously did not have a surname at the beginning of the field and did not have a comma after the surname.
    In code, I checked if the surname equaled the uppercase version of the surname. I also had to check for prefixes such as "Mc", Mac", "De",....

    What is left are the inscriptions you manually have to handle.

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    really appreciate the assist.

    it does exactly what I wanted

    I shall now digest the " queries" to see how you achieved it and then move on the module which will be a new experience

    Cheers

    Ian

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

Similar Threads

  1. Replies: 4
    Last Post: 08-24-2015, 12:57 PM
  2. Copy/paste/rename a field in the same form?
    By Jamesiv1 in forum Access
    Replies: 5
    Last Post: 04-26-2014, 10:22 AM
  3. Copy and Paste Row (vb)
    By Computer202 in forum Programming
    Replies: 7
    Last Post: 03-28-2014, 01:59 AM
  4. Copy and Paste non-visable field
    By delap009 in forum Forms
    Replies: 2
    Last Post: 08-22-2013, 10:23 AM
  5. Replies: 2
    Last Post: 03-10-2013, 01:03 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