Code needed for a button that deletes option group selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Need to add a button to my form that will delete (a.k.a. clear) the
selections from an option group (with 4 radio buttons). Option group is
names optAssignments, and the form is named frmHome.

What is the code for this, for Access 2002.

Thanks!
 
Need to add a button to my form that will delete (a.k.a. clear) the
selections from an option group (with 4 radio buttons). Option group is
names optAssignments, and the form is named frmHome.

What is the code for this, for Access 2002.

Thanks!

OptionGroupName = Null

Another method would be to add one more option to the group.

Let's say it's Label caption is "Clear" and the button's value is 5.
Code the OptionGroup's AfterUpdate event:

If Me!OptionGroupName = 5 Then
Me!OptionGroupName = Null
Else
' Do whatever else is needed.
End If

No command button is needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top