Select all hairlines?

E

EllenM

Hello,
I have a report with lots of hairline lines in the detail section. I'd like
all of them to be 2 pt. Is there a way to select all of them at one time and
change them to 2 pt? Or do I need to pick them out one by one? They are so
small and hard to find.

Thanks in advance,
Ellen
 
D

Duane Hookom

There is not a method of automatically selecting only the lines. You might be
able to select all the controls in the detail section and then one by one
un-select the text boxes while holding down the shift key.

When I have lots of lines to draw, I will often use the Line Method in code.
The drawn lines can reference the position and size of controls on your
report. Assuming you want to place a border around text boxes, you can enter
"Border" into the tag property of each control you want borderd and use this
code.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim intMaxHeight As Integer
Dim ctl As Control
'Find highest control in Detail section _
that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
If ctl.Height > intMaxHeight Then
intMaxHeight = ctl.Height
End If
End If
Next
'Draw a box around each control in Detail _
that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
Me.Line (ctl.Left, ctl.Top)- _
Step(ctl.Width, intMaxHeight), , B
End If
Next
End Sub
 
A

Allen Browne

You can programmatically adjust the width of all lines by opening the report
in design view, and running this code:

Function AdjustLines()
Dim ctl As Control
For Each ctl In Reports(0).Controls
If ctl.ControlType = acLine Then
ctl.BorderWidth = 2
End If
Next
End Function
 
E

EllenM

Thanks so much for your code. Can you explain how to use it? I've copied
both yours and Duane's into modules, but don't know what to do next.

Ellen
 

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