Option group and subform with command button

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

Guest

I have a command button on my main form. I have a subform (lets call it
subForm) with an option group (ogOptionGroup) on it. On the click event of
the Command button, I want to run an If statement referencing the Option
Group. I'm not sure how to do that. If I use:

If ogOptionGroup.value ......I get an error.

Thanks for your help. You all are a great resource.
 
Have you tried using:

If ogOptionGroup = X '(where x is the choice)' then
condition1
else
condition2
end if

By referencing ogOptionGroup.Value, Access thinks you are trying to set the
value instead of reading it.
 
yeah baby!! That's what I needed. Thank you.

mcwilsong said:
Have you tried using:

If ogOptionGroup = X '(where x is the choice)' then
condition1
else
condition2
end if

By referencing ogOptionGroup.Value, Access thinks you are trying to set the
value instead of reading it.
 
Back
Top