Lines on Reports

  • Thread starter Developer of the Caribbean
  • Start date
D

Developer of the Caribbean

I am drawing lines using the Me.Line method during the Print event on an
Access report. (The lines adjust to the size or resizable controls.)

Any lines I draw appear behind the existing controls on the report. I would
like the lines to draw on top of the controls.

Any ideas how I can accomplish this?
 
D

Developer of the Caribbean

Sorry, I should have mentioned this previous . . .

That is what I have always done in the past. In this case, the controls are
largely textboxes or labels with black text and gray backgrounds. When I set
the control to transparent, I lose the gray background on the control, which
is important to the layout of the report (it has lots of labels and lots of
data.)
 
D

Duane Hookom

You could try remove the gray background from the control and draw the
background like you would draw your lines:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'fill the description text box with gray 12632245
Me.Line (Me.Description.Left, Me.Description.Top)-Step _
(Me.Description.Width, Me.Description.Height), 12632256, BF

'set the drawing color back to black
Me.ForeColor = vbBlack
'draw a line across the report at the bottom of
' the text box named ProductName
Me.Line (0, Me.ProductName.Top + Me.ProductName.Height)-Step(Me.Width,
0)
End Sub
 
Top