[dba-VB] Option Group and Select Case Statement

Randall R Anthony RRANTHON at sentara.com
Mon Sep 26 07:33:32 CDT 2005


Hi peeps, dumb question of the day.

In Access, I can create an option group, then use a select case
optiongroupname and run appropriate code within the case statement.  How
do I do this in VB?

I've created a frame, within the frame I've put 3 option buttons.
Here's the code:

Private Sub cmdPrint()
   
   Select Case optButtons
        Case 1 
          msgbox "bob"
        Case 2
          msgbox "fred"
        Case 3
          msgbox "Al"
    End Select

I receive an Argument not Optional error on the select Case statement. 
Your help is appreciated.



More information about the dba-VB mailing list