If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Rounded Rectangle
Hi
I need to insert rounded rectangles on an access report. To see what I mean, open Paint, and selected rounded rectangles from the toolbox. These rectangles are to be in the report header, footer, and body. For the header and footer, I just drew the rectangle in paint, then pasted into access. Works ok, as the footer and header stay the same size. however, the body of the report changes size depending on the page. Some sections are longer than others. I don't want to have to draw a new rectangle for each page. Bit painful. I tried just copying the 'roundy' bits, then lining up with an access rectangle, but its very painful. Any suggestions or tips? Thanks Vayse |
#2
|
|||
|
|||
Rounded Rectangle
Vayse wrote:
I need to insert rounded rectangles on an access report. To see what I mean, open Paint, and selected rounded rectangles from the toolbox. These rectangles are to be in the report header, footer, and body. For the header and footer, I just drew the rectangle in paint, then pasted into access. Works ok, as the footer and header stay the same size. however, the body of the report changes size depending on the page. Some sections are longer than others. I don't want to have to draw a new rectangle for each page. Bit painful. I tried just copying the 'roundy' bits, then lining up with an access rectangle, but its very painful. As you've found, Access does not have a setting for rounded rectangles. However you can use a report's Print event with the Line and Circle methods to draw all kinds of things. Here's some code that draws a rounded rectangle around a text box on a report: Const R As Long = 100 Const Pi As Double = 3.14159265 Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Me.ForeColor = vbGreen Me.DrawWidth = 20 With Me.txtRefNum Me.Line (.Left, .Top + R)-(.Left, .Top + .Height - R) Me.Circle (.Left + R, .Top + R), R, , 0.5 * Pi, Pi Me.Line (.Left + R, .Top)-(.Left + .Width - R, .Top) Me.Circle (.Left + .Width - R, .Top + R), R, , 0, 0.5 * Pi Me.Line (.Left + .Width, .Top + R)-(.Left + .Width, .Top + .Height - R) Me.Circle (.Left + .Width - R, .Top + .Height - R), R, , 1.5 * Pi, 2 * Pi Me.Line (.Left + R, .Top + .Height)-(.Left + .Width - R, ..Top + .Height) Me.Circle (.Left + R, .Top + .Height - R), R, , Pi, 1.5 * Pi End With End Sub -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Rounded Rectangle
"Marshall Barton" wrote in message
... Vayse wrote: I need to insert rounded rectangles on an access report. To see what I mean, Thanks, that code provides what I need. Great stuff. Vayse |
Thread Tools | |
Display Modes | |
|
|