• Separating name (2002)

    Author
    Topic
    #434362

    I have a field with a name John H. Doe
    I want to make a field with First name (FN) only and one with Last Name (LN)only No middle initial
    What is the query code to do it?

    Thanks

    Paul

    Viewing 0 reply threads
    Author
    Replies
    • #1023799

      If all names are of this form, you can use:

      FN: Left([FieldName],InStr([FieldName]," ")-1)

      LN: Mid([FieldName],InstrRev([FieldName]," ")+1)

      where FieldName is the name fo the field.

      Note: InStrRev will only work in expressions in Access 2002 or later.

    Viewing 0 reply threads
    Reply To: Separating name (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: