connecting text boxes with lines

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • noe1818 via AccessMonster.com

    connecting text boxes with lines

    Just a quick question about lines:

    Is it possible to connect a text box (e.g. txtbx1 to txtbx2 and txtbx2 to
    txtbx3) with lines where txtbx1,2,&3 move up or down according to their
    values? Like have access find the location of each txtbx and draw a line from
    it to the other textbox?

    Thanks

    --
    Message posted via AccessMonster.c om


  • noe1818 via AccessMonster.com

    #2
    Re: connecting text boxes with lines

    noe1818 wrote:
    >Just a quick question about lines:
    >
    >Is it possible to connect a text box (e.g. txtbx1 to txtbx2 and txtbx2 to
    >txtbx3) with lines where txtbx1,2,&3 move up or down according to their
    >values? Like have access find the location of each txtbx and draw a line from
    >it to the other textbox?
    >
    >Thanks
    Forgot to mention this will be on a report

    --
    Message posted via AccessMonster.c om


    Comment

    • Salad

      #3
      Re: connecting text boxes with lines

      noe1818 via AccessMonster.c om wrote:
      Just a quick question about lines:
      >
      Is it possible to connect a text box (e.g. txtbx1 to txtbx2 and txtbx2 to
      txtbx3) with lines where txtbx1,2,&3 move up or down according to their
      values? Like have access find the location of each txtbx and draw a line from
      it to the other textbox?
      Quick answer. Yes.
      >
      Thanks
      >

      Comment

      • Salad

        #4
        Re: connecting text boxes with lines

        noe1818 via AccessMonster.c om wrote:
        Just a quick question about lines:
        >
        Is it possible to connect a text box (e.g. txtbx1 to txtbx2 and txtbx2 to
        txtbx3) with lines where txtbx1,2,&3 move up or down according to their
        values? Like have access find the location of each txtbx and draw a line from
        it to the other textbox?
        >
        Thanks
        >
        Probably write your code in the OnFormat event for the band.

        You should be familiar with the Top, Left, Height, and Width properties.
        Dim lngNum As Long
        lngNum = Me.Text1.Left + Me.Text1.width
        Me.Line1.Left = lngNum
        ...etc

        Small Town

        Comment

        • noe1818 via AccessMonster.com

          #5
          Re: connecting text boxes with lines

          I'm not too savy with code, so if you could help me out by explain exactly
          what I have to write, I would appreciate it a lot.

          Salad wrote:
          >Just a quick question about lines:
          >>
          >[quoted text clipped - 4 lines]
          >>
          >Thanks
          >
          >Probably write your code in the OnFormat event for the band.
          >
          >You should be familiar with the Top, Left, Height, and Width properties.
          > Dim lngNum As Long
          > lngNum = Me.Text1.Left + Me.Text1.width
          > Me.Line1.Left = lngNum
          > ...etc
          >
          >Small Town
          >http://www.youtube.com/watch?v=wT051lq5Xh0
          --
          Message posted via http://www.accessmonster.com

          Comment

          • Salad

            #6
            Re: connecting text boxes with lines

            noe1818 via AccessMonster.c om wrote:
            I'm not too savy with code, so if you could help me out by explain exactly
            what I have to write, I would appreciate it a lot.
            You had another post, titled "move from top of page". I wrote the code
            that does the connecting of boxes and moving text boxes up and down and
            posted it there.

            Find my code. Create a new report. Drop 2 text boxes into the Detail
            band and 1 line. Name them Text1, Text2, and Line1. Next, drop my code
            into the report's code module. Then run.

            I set it to 10 up/down levels at 45 twips each. For testing, change the
            Me.Text1.Top = (1 * intHeightPerUni t)
            Me.Text2.Top = (10 * intHeightPerUni t)
            lines. Change the 1 to some other number, the 10 to another and rerun
            to see the up down movement and the line connects....and determine what
            1 unit of height should be between 2 text boxes.

            The 1 and 10 above are values you need to supply in your report.

            Bottom line is...most of the code is done for you. I only have 2 text
            boxes. You'd have to modify it for more text boxes and change the text
            box names.

            OnlyTheLonely

            >
            Salad wrote:
            >
            >>>Just a quick question about lines:
            >>>
            >>
            >>[quoted text clipped - 4 lines]
            >>
            >>>Thanks
            >>
            >>Probably write your code in the OnFormat event for the band.
            >>
            >>You should be familiar with the Top, Left, Height, and Width properties.
            >> Dim lngNum As Long
            >> lngNum = Me.Text1.Left + Me.Text1.width
            >> Me.Line1.Left = lngNum
            >> ...etc
            >>
            >>Small Town
            >>http://www.youtube.com/watch?v=wT051lq5Xh0
            >
            >

            Comment

            • Salad

              #7
              Re: connecting text boxes with lines

              Salad wrote:
              noe1818 via AccessMonster.c om wrote:
              >
              Find my code. Create a new report. Drop 2 text boxes into the Detail
              band and 1 line. Name them Text1, Text2, and Line1. Next, drop my code
              into the report's code module. Then run.
              >
              BTW, enter
              ="Text1"
              and
              ="Text2"
              as the control sources of the textboxes so you can run the new report.

              Comment

              Working...