Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jul 2006
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field lengths in Concatenations (2003)

    Hi, this is an interesting one (I think!). I have two fields I need to concatenate into a string. Field 1 has contains 0-14 characters and Field 2 0-25. The user wants the first 14length field plus a space plus the 25 character field, always returning a 40 field string. this means there may be white space on either right hand side of the space being input. Can anyone tell me how to do this??? Examples (x being white space)

    12345678911234x11111111111111111111xxxxx

    1234xxxxxxxxxxxx1223457891123456789012345

    Hope this makes sense! Cheers. Ina

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Field lengths in Concatenations (2003)

    You can use an expression such as
    <code>
    [Field1] & Space(15-Len([Field1])) & [Field2] & Space(25-Len([Field2))
    </code>
    Substitute the appropriate names for Field1 and Field2.

  3. #3
    Star Lounger
    Join Date
    Jul 2006
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field lengths in Concatenations (2003)

    Worked great - thanks Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •