Upper line a report field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to line the top of a field? I would like to have a currency
field have a single top line and a double underline but i can not figure a
way to upper line the field.

Thanks.
 
mghareeb said:
Is there any way to line the top of a field? I would like to have a currency
field have a single top line and a double underline but i can not figure a
way to upper line the field.


Why not just add some Line controls above and below the
currency text box?
 
There are about 300 currency fields within about 25 reports so I was hoping
to not have to draw a manual line above and below each field.
 
I assume you mean top of a text box rather than top of a field. You can use
code to draw lines based on a specific character in the tag property of the
control. Add "T" and/or "B" to the tag property of the text boxes you want
to "decorate". Then add this code to the On Print event of the section
containing the controls.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim ctl As Control
For Each ctl In Me.Section(0).Controls
If InStr(ctl.Tag, "T") > 0 Then 'check for Top
Me.Line (ctl.Left, ctl.Top)- _
Step(ctl.Width, 0)
End If
If InStr(ctl.Tag, "B") > 0 Then 'check for Bottom
Me.Line (ctl.Left, ctl.Top + ctl.Height - 30)- _
Step(ctl.Width, 0)
Me.Line (ctl.Left, ctl.Top + ctl.Height - 10)- _
Step(ctl.Width, 0)
End If
Next
End Sub
 
Nothing I am aware of in a text box's capabilities. Text
boxes are not like Excel Cells.

With that many controls to deal with, you wouldn't want to
add so many additional controls anyway. In your kind of
situation, I would go with Duane's approach.
 
Back
Top