Grid Line for First Field in detail

  • Thread starter Thread starter Nancy
  • Start date Start date
N

Nancy

I can get grid lines around each field except the first field.
How do I get a grid line on the left side of the first field:
Here is my code:

For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)

End With
Next

Thanks,
nancye
 
You may need to move the text box slightly from the left side of the screen
before the line will show (i.e. make sure its Left property is not set to
zero.)
 
I guess I mis-read your question. Do you want a box around all controls other
than the leftmost control? If so, I would enter something into the tag
property of the leftmost control so you could use code like:
If .Tag = "LeftSideOnly" Then
Me.Line ((.Left + .Width + intLineMargin), 0)-Step(0, Me.Height)
Else
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
 
Back
Top