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

Circles in Reports 1

Status
Not open for further replies.

Kosmo2

Technical User
Mar 21, 2002
18
CA
Can anybody tell me an easy way to create a circular text box in a report , Basically I need it to display a single letter and have the circle background turn Green, red or yellow depending on the letter entered via a Input Form

i.e. R , G or Y


 
Hi,

Add an image object to your report.

Create 26 x 3 images (red,yellow and green) and store them in a table. (Not a massive job).

Otherwise create 3 round images (different colours), paint your square text-box inside the image.

You ain't gonna create round text-boxes without massive 3gl programming (if even possible).

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Sounds "EASY" , I'll give it a go

Thanks for the advice
 
You can use the CIRCLE method on reports, and fill the circe with a color. You can also position a text box over the circle and set the (display) order of the co-located controls to assure that the text is displayed in the foreground. See POH (Plain Old Help) for the info on the CIRCLE method.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Michael,
I just tried an experiment in Access 2000, with an image control. When I tried to use the "Circle" method, it doesn't appear. Am I missing something?
HTH,
Randy Smith
California Teachers Association
 
Hi everyone!
Here is some code I found in the POH, as Michael had alluded to earlier:

Be sure to place this in the "Print" event for any section.

Const conPI = 3.14159265359
Dim sngHCtr As Single, sngVCtr As Single
Dim sngRadius As Single
Dim sngStart As Single, sngEnd As Single

sngHCtr = Me.ScaleWidth / 2 ' Horizontal center.
sngVCtr = Me.ScaleHeight / 2 ' Vertical center.
sngRadius = Me.ScaleHeight / 3 ' Circle radius.
' Draw circle.
Me.Circle (sngHCtr, sngVCtr), sngRadius
sngStart = -0.00000001 ' Start of pie slice.
sngEnd = -2 * conPI / 3 ' End of pie slice.
Me.FillColor = RGB(255, 0, 0) ' Color pie slice red.
Me.FillStyle = 0 ' Fill pie slice.
' Draw pie slice within circle.
Me.Circle (sngHCtr, sngVCtr), sngRadius, , sngStart, sngEnd HTH,
Randy Smith
California Teachers Association
 
Thanks for the info Randy, however this code is to create a Pie chart type circle in the report , I am sure for Access Wiz's it is easy to modify but to your average user it doesnt suit , how would you Modify the code to show just a solid colour ???
 
Just refer to help. Topic "CIRCLE". It ("CIRCLE"), as clearly noted (inder the heading of "Applies To"), only works (e.g. "Aplies To") report objects. But that IS the forum.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Hi,
Here is some relatively simple code to add a circle to the report. You will need to paste this into one of the "print" events:

' values are in twips, with 1,440 per inch
' 1st value is left to right position (4320)
' 2nd value is top to bottom positioning (1440)
' 3rd value is radius of circle (1000)
Me.Circle (4320, 1440), 1000
Me.FillColor = vbRed '(or vbGreen, or vbBlue, etc.)
Me.FillStyle = 0

HTH,
Randy Smith
California Teachers Association
 
Hi Randy, Worked a treat , Thanks a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top