Hans said:
I currently developing an access application and the client wants boxes with
rounded corners in some of the reports.
Can some point me in the right direction to make corners rounded.
If you are using A97 (or earlier) or A2007, then look up the
Line and Circle methods in VBA Help. For A2000 through
A2003, Help was garbled, but the examples were still ok.
The general idea is that you need to use code to draw the
rounded boxes. The kind of code would be something like:
Const PI As Double = 3.14159265359
Const r As Integer = 100 'corner radius in twips
Me.DrawWidth = 15 'line thickness
With Me.Textbox
Me.Line (.Left + r, .Top)-(.Left + .Width - r, .Top)
Me.Line (.Left + r, .Top + .Height)-(.Left + .Width - r,
..Top + .Height)
Me.Line (.Left, .Top + r)-(.Left, .Top + .Height - r)
Me.Line (.Left + .Width, .Top + r)-(.Left + .Width, .Top
+ .Height - r)
Me.Circle (.Left + r, .Top + r), r, , 0.5 * PI, 1 * PI
Me.Circle (.Left + .Width - r, .Top + r), r, , 0 * PI,
0.5 * PI
Me.Circle (.Left + r, .Top + .Height - r), r, , 1 * PI,
1.5 * PI
Me.Circle (.Left + .Width - r, .Top + .Height - r), r, ,
1.5 * PI, 2 * PI
End With
If you are doing that for several text boxes, put the above
codea Sub procedure with an argument for the text box
control. Then call the procedure for each text box.