The normal method for handling Option Button
controls in an Access form is to make them child controls of an Option Group
(a.k.a. Frame
) control. You retrieve the selected option from the .Value
property of the Option Group
control like this:
Option Compare Database
Option Explicit
Private Sub btnSave_Click()
Dim msg As String
If IsNull(Me.frame_membershiptype.Value) Then
msg = "No membership type has been selected."
Else
msg = "Membership type selected: "
Select Case Me.frame_membershiptype.Value
Case 1
msg = msg & "Standard"
Case 2
msg = msg & "Concession"
Case 3
msg = msg & "Lifetime"
Case Else
msg = msg & "Unknown"
End Select
End If
MsgBox msg
End Sub