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

Auto Extending Verticle Lines

P: n/a
Hello,

In Report Design View in the Detail Section I have several vertical
lines that I would like to autoextend with the length of the detail
section. This is becasue I have a memo field that "Can Grow" so that
it can fit all the information that the users input.

If anyone knows how to do this for the lines that would be greatly
appreciated. Thanks,

--Jason Coleman

Jun 4 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Jun 4, 11:28 am, colemanj4 <colema...@gmail.comwrote:
Hello,

In Report Design View in the Detail Section I have several vertical
lines that I would like to autoextend with the length of the detail
section. This is becasue I have a memo field that "Can Grow" so that
it can fit all the information that the users input.

If anyone knows how to do this for the lines that would be greatly
appreciated. Thanks,

--Jason Coleman
This will be really tricky:

for each vertical line, create two textboxes with the memo field as
ControlSource. It is important that both have same CanGrow, CanShrink,
Width and Height properties;
Drag&drop both to the same place, with just some pixels horizontal
difference between them;
The textbox in background, define its backColor and bordercolor to
black;
The textbox in foreground, backColor and borderColor = Transparent or
white;
Voilą. You have a vertical line, witch widht corresponds to the
horizontal difference between fore and back textboxes.

I told you it would be tricky!

Jun 4 '07 #2

P: n/a
Wow! That works perfectly! Thanks a lot!

--Jason Coleman

On Jun 4, 2:16 pm, spier <spie...@yahoo.comwrote:
On Jun 4, 11:28 am, colemanj4 <colema...@gmail.comwrote:
Hello,
In Report Design View in the Detail Section I have several vertical
lines that I would like to autoextend with the length of the detail
section. This is becasue I have a memo field that "Can Grow" so that
it can fit all the information that the users input.
If anyone knows how to do this for the lines that would be greatly
appreciated. Thanks,
--Jason Coleman

This will be really tricky:

for each vertical line, create two textboxes with the memo field as
ControlSource. It is important that both have same CanGrow, CanShrink,
Width and Height properties;
Drag&drop both to the same place, with just some pixels horizontal
difference between them;
The textbox in background, define its backColor and bordercolor to
black;
The textbox in foreground, backColor and borderColor = Transparent or
white;
Voilą. You have a vertical line, witch widht corresponds to the
horizontal difference between fore and back textboxes.

I told you it would be tricky!

Jun 4 '07 #3

P: n/a
colemanj4 <co*******@gmail.comwrote in
news:11**********************@w5g2000hsg.googlegro ups.com:
Wow! That works perfectly! Thanks a lot!

--Jason Coleman

On Jun 4, 2:16 pm, spier <spie...@yahoo.comwrote:
>On Jun 4, 11:28 am, colemanj4 <colema...@gmail.comwrote:
Hello,
In Report Design View in the Detail Section I have several
vertical lines that I would like to autoextend with the
length of the detail section. This is becasue I have a memo
field that "Can Grow" so that it can fit all the
information that the users input.
If anyone knows how to do this for the lines that would be
greatly appreciated. Thanks,
--Jason Coleman

This will be really tricky:

for each vertical line, create two textboxes with the memo
field as ControlSource. It is important that both have same
CanGrow, CanShrink, Width and Height properties;
Drag&drop both to the same place, with just some pixels
horizontal difference between them;
The textbox in background, define its backColor and
bordercolor to black;
The textbox in foreground, backColor and borderColor =
Transparent or white;
Voilą. You have a vertical line, witch widht corresponds to
the horizontal difference between fore and back textboxes.

I told you it would be tricky!

Please ignore my other post there is an issue in it that I
forgot about, where sometimes the line gets it size before the
field that grows. This is correct code to draw 2 vertical lines
that size based on another control's size

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
Dim x1 As Integer, x2 As Integer
dim x3 as integer, x4 as integer
dim y1 As Integer,y2 As Integer
dim C as long

x1 = Me.txtcanGrow.Left
x2 = Me.txtcanGrow.Left + Me.txtcanGrow.Width
x3 = me.txtanother.left
x4 = me.txtanother.left + me.txtanother.width

y1 = Me.txtcanGrow.Top
y2 = Me.txtcanGrow.Top + Me.txtcanGrow.Height
c = RGB(0,0,0)

Me.Line (x1, y1)-(x1, y2),c
Me.Line (x2, y1)-(x2, y2),c
Me.Line (x3, y1)-(x3, y2),c
Me.Line (x4, y1)-(x4, y2),c

End Sub

alternately, the last four lines can become
Me.Line (x1, y1)-(x2, y2),c, B 'this draws a box.
Me.Line (x3, y1)-(x4, y2),c, B 'this draws a box.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #4

P: n/a
colemanj4 <co*******@gmail.comwrote in
news:11**********************@w5g2000hsg.googlegro ups.com:
Wow! That works perfectly! Thanks a lot!

--Jason Coleman

On Jun 4, 2:16 pm, spier <spie...@yahoo.comwrote:
>On Jun 4, 11:28 am, colemanj4 <colema...@gmail.comwrote:
Hello,
In Report Design View in the Detail Section I have several
vertical lines that I would like to autoextend with the
length of the detail section. This is becasue I have a memo
field that "Can Grow" so that it can fit all the
information that the users input.
If anyone knows how to do this for the lines that would be
greatly appreciated. Thanks,
--Jason Coleman

This will be really tricky:

for each vertical line, create two textboxes with the memo
field as ControlSource. It is important that both have same
CanGrow, CanShrink, Width and Height properties;
Drag&drop both to the same place, with just some pixels
horizontal difference between them;
The textbox in background, define its backColor and
bordercolor to black;
The textbox in foreground, backColor and borderColor =
Transparent or white;
Voilą. You have a vertical line, witch widht corresponds to
the horizontal difference between fore and back textboxes.

I told you it would be tricky!
There is a much simpler way, using a little visual basic code in
the On_Format event of the section (detail, I presume).

Just copy the me.ctlMemoThatGrows..height property, to the
..height each vertical line that needs to grow.
Me.Line1.Height = Me.Memo.Height
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.