Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Copying some text from an MS Word text field to another field

  • 19-11-2011 10:54pm
    #1
    Registered Users, Registered Users 2 Posts: 1,501 ✭✭✭


    Hi all,

    I'm designing a form with a number of text fields. One if the text fields will contain a person's full name (e.g. Joe Bloggs) and another one will contain the person's christian name only (Joe).

    I would like to be able to automate this so that when the first text field is filled in, the other is automatically filled in. I've done it already so that when one field is completed, its full contents are copied to a number of other text fields in the document.

    Is there a way of doing this?


Comments

  • Registered Users, Registered Users 2 Posts: 1,456 ✭✭✭FSL


    Yes you have the full text string available to you you just need to decide which portion of it is the first name(s) and which is the surname(s).

    Virtually impossible given some people are known by two Christian names and others have double surnames.


  • Registered Users, Registered Users 2 Posts: 1,501 ✭✭✭Delphi91


    FSL wrote: »
    Yes you have the full text string available to you you just need to decide which portion of it is the first name(s) and which is the surname(s).

    Virtually impossible given some people are known by two Christian names and others have double surnames.

    Well, in the cases that I'm dealing with, I'm not aware of anyone who has two christian names, so I'd like to be in a position to take all the text in the first string up to the point where I reach a space.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,604 Mod ✭✭✭✭Capt'n Midnight


    Delphi91 wrote: »
    Well, in the cases that I'm dealing with, I'm not aware of anyone who has two christian names, so I'd like to be in a position to take all the text in the first string up to the point where I reach a space.
    Boutros Boutros Ghali ?

    use instr to find the first space
    (should you consider hyphens ? or Continental names since a lot of European countries use Surname first)


  • Registered Users, Registered Users 2 Posts: 5,150 ✭✭✭homer911


    Why not work it in reverse and concatenate?

    Enter Christian Name and Surname separately, then concatenate in a 3rd field


  • Registered Users, Registered Users 2 Posts: 1,501 ✭✭✭Delphi91


    Boutros Boutros Ghali ?

    use instr to find the first space
    (should you consider hyphens ? or Continental names since a lot of European countries use Surname first)

    He's not in my organisation :D

    I was looking at some VBA code yesterday and found a way of doing it using instr. But doesn't that involve the use of macros?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,501 ✭✭✭Delphi91


    homer911 wrote: »
    Why not work it in reverse and concatenate?

    Enter Christian Name and Surname separately, then concatenate in a 3rd field

    The document I'm creating has the person's full name written into a text field near the top and then further down I want to be able to reference the person's christian name. Hence the need to be able to extract the christian name from the text field.

    I was thinking along the lines of using instr to find the position of the blank space, then extracting the string from the start to the position of the blank.


Advertisement