title: Handling option groups in Access form- runtime error 2427
body: <p>I have an option group on a form. I want the form to process code based on which button is selected. The snippet I have for now is:</p>
  
  <pre><code>If Me.Option18.Value = True Then
      DoCmd.OpenQuery "Logbook Query all available"
  End If
  </code></pre>
  
  <p>Option 18 is the radio button on the form.<br>
  On the If line, I get 'run time error 2427: You entered an expression that has no value'</p>
  
  <p>I tried different uses of me.option 18, and get the same error. I also tried replacing 'true' with 1, same result.</p>
  
  <p>Is there a better way to execute code based on an option group selection. or is this simply a syntax error?</p>