3 Replies Latest reply on Jun 8, 2012 9:14 AM by petery009

    Conbine 2 fields to 1 text field and also lines up!?

    petery009

      HI, everyone

       

      I am facing a problem, i have 2 fields in one record say Field1 : "Reference", Field 2 : "Title", Data in the record would look like this:

       

      ref1 soccer

      Ref2 football

      ReF1 Basketball

       

      I would like to put those two fields in one text field and also line them up like this:

       

      ref1 soccer

      Ref2 football

      ReF1 Basketball

       

      * * * Even manually i can't line them up cause the font size for each letter are different!? * * *

       

      One way to solve this is to use font size "courier new", but i don't want to limit the font!

       

      Please help! and at least point me to a right direction if this cannot work !?

       

      Thanks!

        • 1. Re: Conbine 2 fields to 1 text field and also lines up!?
          comment

          You don't need another field for this. Just type the following text on the layout:

           

          tab<<Reference>>tab<<Title>>

           

          where tab means the tab character. Then select the entire text object and format it to have two tab positions, one right at say 175 px and one left at say 200 px.

           

           

          Or just place the two fields on the layout side by side, and align the left one (Reference) to the right.

          • 2. Re: Conbine 2 fields to 1 text field and also lines up!?
            BowdenData

            Hi,

             

            Your calculated field will need to include tab characters and you will need to format the display of the field with a couple of tab stops.

             

            Your calc field would contain "tabcharRef1tabcharSoccer"

             

            Use the Char() function to insert a tab character into your calculation. I don't recall off hand, but I think it is Char (9) for a TAB. You can look that up to be sure.

             

            In layout mode, click on the field and use the inspector to insert one right-aligned tab stop and one left-aligned tab stop. Go back into Browse mode and select to show the Text ruler from under the View menu. Click in the calc field and you should see the tab stops in the ruler. Slide the tab stops around to get them how you want. You can then turn off showing of the text ruler.

             

            Having said all this, it would probably be best for you the keep the fields separate and just put them side by side on your layout and go from there.

             

            HTH.

             

            Doug

            • 3. Re: Conbine 2 fields to 1 text field and also lines up!?
              petery009

              Thanks you all! It works!

               

              With tabs in my calculation field, and also i used the function left() since my field size may larger than the TAB size, so it looks like this : char(9) & left( field1 & "                    " ; 20) & char(9) & char(9) & field2.