Personally I like to use a select case statement with option groups. Easier to make changes and easier to follow.
Code:
Select Case YourOptionGroupName
Case 1
strSql = "Select * ....... where SomeCriteria = Something
Case 2
strSql = "Select * ....... where SomeCriteria = Something
Case 3
strSql = "Select * ....... where SomeCriteria = Something
Case else
msgbox "something went wrong"
End Select
The current selection criteria in the query is “[Forms]![frmSearch]![opgClass]”
Only use the option group values to indicate your choice. I would not use the OG values to associate to a value in your table ( like 1 for Class A, 2 for Class B)
If this helped, please click the star * at the bottom left and add to my reputation- Thanks