Grid Line for First Field in detail

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
 
A

Allen Browne

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.)
 
D

Duane Hookom

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
 

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