I'm not exactly sure how you have these controls setup. But again, I like to
put something in the tag property that identifies if a control should have
lines on its left, top, right, or bottom. Consider entering any combination
of LTRB for these sides into the tag. Then you might have code in the On
Format event of a section like:
Dim ctl as Control
dim strTag as String
For Each ctl in Me.Controls
strTag = ctl.Tag & ""
If Instr(strTag,"L") Then 'left
Me.Line (ctl.Left, clt.Top)-Step (0,clt.Height)
End If
If Instr(strTag,"T") Then 'top
Me.Line (ctl.Left, clt.Top)-Step (clt.Width,0)
End If
'duplicate similar code for left and bottom
'the line method uses the first (x,y) as the x and y position in the
section
' the Step argument is used to set the (x,y) to relative to the first
(x,y)
Next
--
Duane Hookom
MS Access MVP
"Access infant" <(E-Mail Removed)> wrote in message
news

1879C01-B9D2-4611-807E-(E-Mail Removed)...
> Actually i have added some unbound controls in the different group footers
> and the report and page footers also. so, in order to make sure that the
> line
> would be straight, can i take the left of a control in the detail section
> only and store it in a module level variable and use the same value in all
> sections 'on print' event. so that the line could be straight ? If you
> don't
> feel that i am expecting too much of you, could you please give me code
> for
> one section which i can use with changes (if needed) for other sections
> also.Or at least direct me to a link where i can get some sample code.
> --
> from
> chanakya
> Baruva
>
>