Microsoft KB Archive/210365

= ACC2000: How to Use the Circle Method on a Report =

Article ID: 210365

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q210365



This article applies only to a Microsoft Access database (.mdb).

Moderate: Requires basic macro, coding, and interoperability skills.



SUMMARY
This article shows you how to use the Circle method to create a filled-in "pie slice" on a report.



MORE INFORMATION
The following sample, user-defined function, PIE, can be called from an event property in the detail section of a report. The function uses the Circle method to create a filled-in "pie slice" on the report:  Start Microsoft Access and open any database.  Create a new module and enter the following code: Function PIE(Rpt as Report) Const PI = 3.14159265359 Const CStart = -.00000001 Const CEnd = -2 * PI / 6

Rpt.FillColor = RGB(255, 0, 0) Rpt.FillStyle = 0 Rpt.Circle (1500, 1500), 1500, RGB(0, 255, 0), Cstart, CEnd End Function  Create a new report named TestReport. The report can be bound or unbound.  Set the OnPrint property of the detail section of the report to the following expression:    =PIE([Reports]![TestReport])  Set the Height property of the detail section to 2.5 inches. Preview the report.</li></ol>

<div class="references_section">