Height of vertcal line dependent of size textbox

S

Sietske

I really hope someone can help me out, because I'm completely stuck.

The details section of my report contains a table, where each row is one
record. Sometimes there is many text in the textboxes, and the textbox
becomes larger (thanks to the CanGrow property). However, I do not succeed in
letting the vertical lines of the table grow when the text boxes are larger!
What am I doing wrong?

The details section of my report contains rows, made of five text boxes (1,
2, 3, 4 and 5) and a subreport (6) like schematically given below. Textbox 1
and 2 are above each other, boxes 3, 4 and 5 are aside each other, and the
subreport is below it, covering the entire width of the page.

10000--30000--40000--50000
20000--30000--00000--00000
---------30000--00000--00000
600000000000000000000000

I've tried the following first in the details format section:

Me.NameOfLine1.Height = me.section(acDetail).Height
Me.NameOfLine2.Height = me.section(acDetail).Height (etc...)

But this didn't do anything, not even resulting in an error. Next I've tried
to put the following in the details print section (after a suggestion I found
elsewhere in this news group):

Dim lngHeight As Long
Dim ctrlTextbox As Control

For Each ctrlTextbox In Me.Section(acDetails).Controls
If ctrlTextbox.Height > lngHeight Then
lngHeight = ctrlTextbox.Height
End If
Next

Me.NameOfLine1.Height = lngHeight
Me.NameOfLine2.Height = lngHeight (etc...)

In the details print section the last two lines gave err.number 2191,
because "it couldn't adjust the height property from print preview or after
the printing has started". When I put it in the details format section, it
didn't do anything at all.
 
S

Sietske

Solved the problem thanks to a reaction of Duane Hookum of 8/18/2005: I've
used

Me.ForeColor = vbRed
Me.DrawWidth = 5
'change the numbers to change the position
Me.Line (1440, 0)-Step(0, 20000)

in the Details_Format of my form, and it looks great now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top