Option Explicit
Private Function OldRadio(psec As [_SectionInReport])
Dim ctl As Control
Dim lngCX As Long
Dim lngCY As Long
Dim lngRad As Long
For Each ctl In psec.Controls
If ctl.ControlType = acOptionButton Then
lngCX = ctl.Left + ctl.Width / 2
lngCY = ctl.Top + ctl.Height / 2
lngRad = ctl.Width / 2
' draw circle
Me.FillStyle = 1 ' transparent
Me.Circle (lngCX, lngCY), lngRad
Me.FillStyle = 0 ' opaque
If ctl.Value = True Then
Me.FillColor = vbBlack
Me.Circle (lngCX, lngCY), lngRad / 2
ElseIf ctl.Value = False Then
' nothing
Else ' Null
Me.FillColor = RGB(153, 153, 153)
Me.Circle (lngCX, lngCY), lngRad * 3 / 4, vbWhite
End If
End If
Next ctl
End Function
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
OldRadio Detail
End Sub
|