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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Border Around Each Character

Status
Not open for further replies.

efilenow

Technical User
Jul 27, 2008
1
US
I'd like to print a border around each character in the detail section of my report.

Thanks,
 
You will have to create a label for each of the letters and set the border properties accordingly.

Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
I have done something similar by using the Print method of the report. This code places characters from a LastName text box into boxes created using the rectangle control. You could use the Line method in code to draw the rectangles.

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim strLastName As String
    Dim intTop As Integer
    Dim intSpacing As Integer
    Dim intCharacter As Integer
    Dim intLeftMost As Integer
    intSpacing = 1440 / 4   '1/4 inch
    strLastName = Me.LastName
    Me.FontSize = 16
    intLeftMost = Me.LastName.Left
    intTop = Me.LastName.Top
    
    For intCharacter = 1 To Len(strLastName)
        Me.CurrentX = intLeftMost + (intCharacter - 1) * intSpacing
        Me.CurrentY = intTop
        Me.Print Mid(strLastName, intCharacter, 1)
    Next
End Sub

Duane
Hook'D on Access
MS Access MVP
 
It would be useful if you told us why you wanted to do this.
We may come up with alternative answers.

Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top