INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How To

Draw a box with rounded corners by dhookom
Posted: 8 Nov 04

Place this code in a standard module and save the module as "basReportFunctions". You can call the function in the On Format of a section or in the On Page event.

CODE

Sub RoundCornerBox( _
        lngWidth As Long, _
        lngHeight As Long, _
        lngTop As Long, _
        lngLeft As Long, _
        lngRadius As Long, _
        rptReport As Report)
    'call this from a report with syntax like
    '
    'Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    '    RoundCornerBox 4000, 6000, 100, 200, 300, Me
    'End Sub

    Dim sngStart As Single
    Dim sngEnd As Single
    Dim dblPI As Double
    dblPI = 3.14159265359

    'Top Left
    sngStart = 2 * dblPI * 0.25 ' Start of pie slice.
    sngEnd = 2 * dblPI * 0.5    ' End of pie slice.
    rptReport.Circle (lngLeft + lngRadius, _
            lngTop + lngRadius), _
            lngRadius, vbBlue, sngStart, sngEnd
    'Top line
    rptReport.Line (lngLeft + lngRadius, lngTop)- _
        (lngLeft + lngWidth - lngRadius, lngTop)

    'Top Right
    sngStart = 2 * dblPI * 0.000001
    sngEnd = 2 * dblPI * 0.25
    rptReport.Circle (lngLeft + lngWidth - _
            lngRadius, lngTop + lngRadius), _
            lngRadius, vbBlue, sngStart, sngEnd
    'right line
    rptReport.Line (lngLeft + lngWidth, _
        lngTop + lngRadius)- _
        (lngLeft + lngWidth, _
        lngTop + lngHeight - lngRadius)

    'Bottom right
    sngStart = 2 * dblPI * 0.75
    sngEnd = 2 * dblPI
    rptReport.Circle (lngLeft + lngWidth - _
        lngRadius, lngTop + lngHeight - lngRadius), _
        lngRadius, vbBlue, sngStart, sngEnd
    rptReport.Line (lngLeft + lngRadius, _
        lngTop + lngHeight)- _
        (lngLeft + lngWidth - lngRadius, lngTop + lngHeight)

    'Bottom Left
    sngStart = 2 * dblPI * 0.5
    sngEnd = 2 * dblPI * 0.75
    rptReport.Circle (lngLeft + lngRadius, _
        lngTop + lngHeight - lngRadius), _
        lngRadius, vbBlue, sngStart, sngEnd
    'right line
    rptReport.Line (lngLeft, lngTop + lngRadius)- _
        (lngLeft, lngTop + lngHeight - lngRadius)

End Sub

Back to Microsoft: Access Reports FAQ Index
Back to Microsoft: Access Reports Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close