Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change line's thickness via code

Status
Not open for further replies.

leesanc

Technical User
Aug 25, 2006
10
MY
Is there anyway i can change a line i've drawn in an access report to appear thicker than "Hairline" and thinner than 1pt.

Code:
With Me
   .DrawWidth = 5
   Me.Line(x1,y1)-(x2,y2)
End With

The code only applies for Me.Line. Is there any way i can apply it to say Me.Line10
 
You can use code like:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.LastName > "l" Then
        Me.Line1.BorderWidth = 4
     Else
        Me.Line1.BorderWidth = 1
    End If
End Sub

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
thanks for the fast response.

i tried me.line1.borderwidth = 0.5 and it appears as hairline while 0.55 appears as 1pt. i'm still not able to get something in between.
 
I doubt you can do this with a single line control. You might be able to use two hairline line controls and have code position one X number of twips from the other.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top