vertical line in report detail field

G

Guest

I am trying to create a vertical line in a report that will expand to fill up
the whole detail section. I am running into a problem with the line not
extending past the first line in a memo field. If I set the memo box so it
can't grow the vertical line connects up fine. If I allow the memo box to
grow the vertical line has spaces when the memo box expands.

Hopefully someone can help.
 
M

Marshall Barton

Mark G said:
I am trying to create a vertical line in a report that will expand to fill up
the whole detail section. I am running into a problem with the line not
extending past the first line in a memo field. If I set the memo box so it
can't grow the vertical line connects up fine. If I allow the memo box to
grow the vertical line has spaces when the memo box expands.

The line control does not expand to the section's height.
You need to use the report's Line method in the detail
section's Print event to draw the line. You didn't provide
any indication of where the line should be, but the general
idea is:
Me.Line (xx, 0) - Step(0, 20000)

where xx is the horizontal position where you want the line.
For example, if you want the line at the left edge of a text
box named tb, then it would be:
Me.Line (Me.tb.Left, 0) - Step(0, 20000)
If you want it at the right edge of a text box:
Me.Line (Me.tb.Left + Me.tb.Width, 0) - Step(0, 20000)
 
G

Guest

Marshall Barton said:
The line control does not expand to the section's height.
You need to use the report's Line method in the detail
section's Print event to draw the line. You didn't provide
any indication of where the line should be, but the general
idea is:
Me.Line (xx, 0) - Step(0, 20000)

where xx is the horizontal position where you want the line.
For example, if you want the line at the left edge of a text
box named tb, then it would be:
Me.Line (Me.tb.Left, 0) - Step(0, 20000)
If you want it at the right edge of a text box:
Me.Line (Me.tb.Left + Me.tb.Width, 0) - Step(0, 20000)

I have been trying to figure this out for a while. I'm a 'user' but not a
programmer. What is a print event? and/or where do I enter these
commands?
 
D

Duane Hookom

Open your report in design view. View the properties dialog for the section
of the report that you want to draw the line. One of the properties is the
On Print event property. You can drop down the property events options and
select [Event Procedure]. Then click the [...] button to open the code
window for the event. You will see something like:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

End Sub

You can enter code between the "Private..." and "End Sub" lines.
 

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