By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,477 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,477 IT Pros & Developers. It's quick & easy.

connecting text boxes with lines

P: n/a
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/For...ccess/200804/1

Apr 10 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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/For...ccess/200804/1

Apr 10 '08 #2

P: n/a
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
Apr 10 '08 #3

P: n/a
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
Apr 10 '08 #4

P: n/a
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

Jun 27 '08 #5

P: n/a
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

Jun 27 '08 #6

P: n/a
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.
Jun 27 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.