View Single Post
  #2  
Old May 28th, 2004, 02:53 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default OptionGroup Loop

You can loop through your controls and identify which are option groups this
way:

Dim ctl As Control
For Each ctl in Me.Controls
If ctl.ControlType = acOptionGroup Then
Debug.Print "The value of this option group is " & ctl.Value
End If
Next ctl

--
Ken Snell
MS ACCESS MVP

"Pedro" wrote in message
...
Hi, I have several option groups on a form. I want to loop through them

and determine their value and performan an action based upon the value. Now
the code that determines there value and performs the action is simple
enough. However what I am struggling with is the actual looping. No matter
how I try (collection, array) it always comes back with an error that
doesn't accept optiongroup as a valid object type for looping.

i am using Access 97. Can anyone help?