connecting text boxes with lines

connecting text boxes with lines

am 10.04.2008 16:53:19 von u39419

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.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-ac cess/200804/1

Re: connecting text boxes with lines

am 10.04.2008 16:56:29 von u39419

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.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-ac cess/200804/1

Re: connecting text boxes with lines

am 10.04.2008 17:17:44 von Salad

noe1818 via AccessMonster.com 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
>

Re: connecting text boxes with lines

am 10.04.2008 17:30:00 von Salad

noe1818 via AccessMonster.com 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
http://www.youtube.com/watch?v=wT051lq5Xh0

Re: connecting text boxes with lines

am 14.04.2008 16:26:11 von u39419

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

Re: connecting text boxes with lines

am 14.04.2008 17:32:41 von Salad

noe1818 via AccessMonster.com 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 * intHeightPerUnit)
Me.Text2.Top = (10 * intHeightPerUnit)
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
http://www.youtube.com/watch?v=IfKmoBYZWz0

>
> 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
>
>

Re: connecting text boxes with lines

am 14.04.2008 18:31:19 von Salad

Salad wrote:

> noe1818 via AccessMonster.com 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.