Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Nov 2003
    Location
    St. Paul, Minnesota, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unbound Text Box Formatting (2003)

    I'm sure there is a simple explanation for this, but I must not be searching on the right key words.

    I have an unbound text box that contains all the address information:
    Address1
    Address2
    City, State Zip

    I want it to appear in that format with carriage returns after each field and no blank lines if the address does not have anything in Address2.

    I tried using the Expression Builder, but I cannot figure out how to insert carriage returns after each field and everything comes out on one line.

    Any ideas?

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

    Re: Unbound Text Box Formatting (2003)

    Try this:
    <code>
    =[Address1] & Chr(13)+Chr(10)+[Address2] & Chr(13) & Chr(10) & [City] & ", " & [State] & " " & [Zip]
    </code>
    Concatenating with + instead of & results in Null if one of the constituents is Null.

  3. #3
    Lounger
    Join Date
    Nov 2003
    Location
    St. Paul, Minnesota, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unbound Text Box Formatting (2003)

    Hans, you amaze me.

    Worked like a charm.

Posting Permissions

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