A family of Microsoft relational database management systems designed for ease of use.
The approach you are attempting of calling the OpenForm method conditionally in different lines, with arguments determined by the value in the control is not one of the options I outlined. In all of the solutions I described the OpenForm method is called in one line only.
Of the alternative solutions the one I would use is option 4 as this requires the button's code to simply open the form, as the restriction is done entirely by the second form's query. This is relatively easy to build as the logic is quite straightforward. The only difference would be that you would test for <ALL> rather than Null in the case of the combo box. In the case of the option buttons be sure that these are all set to False by default to avoid having to cater for Nulls.
I'm assuming that you want to restrict the results to the selected value of Type or All types, further restricted by one or more values of Status as selected by the option buttons, for which the query for the second form's RecordSource would be like this:
SELECT *
FROM YourTable
WHERE ([Type] = Forms!LMS_MainMenu!CourseCatalogCombo
OR Forms!LMS_MainMenu!CourseCatalogCombo = "<All>")
AND (([Status] = "Open" AND Forms!LMS_MainMenu!OptOpen = TRUE)
OR ([Status] = "Active" AND Forms!LMS_MainMenu!OptActive = TRUE)
OR ([Status] = "Closed" AND Forms!LMS_MainMenu!OptClosed = TRUE)
OR ([Status] = "Complete" AND Forms!LMS_MainMenu!OptComplete = TRUE));
The query might draw upon more than one table of course and might include an ORDER BY clause to set the order in which the records are returned in the form.
Note the position of the parentheses in the above. These are important to force the correct order of evaluation of the OR and AND operations. Create the query, or at least add its WHERE clause, in SQL view not design view, and save it in SQL view without switching back to design view. If you do, Access will move things around and at best the logic will be obscured, at worst the query might be too complex to open.
In the button's code you simply open the form with:
DoCmd.OpenForm "LMS_CourseCatalog"
Do not close the "LMS_MainMenu" form in this procedure as it needs to be exposed to the second form's query, though you can hide it, in which case the code would be:
DoCmd.OpenForm "LMS_CourseCatalog"
Me.Visible = False
You can close it in the "LMS_CourseCatalog" form's Close event procedure with:
DoCmd.Close acForm, "LMS_MainMenu"
One supplementary comment I would make, with regard to the use of option buttons, is that this ties you in to a set of four options. Should at any time you introduce another Status option into the database, or delete or rename an existing one, then you'd have to amend the form design. You might have noticed that my MultiSelect demo allows for multiple selections by means of a multi-select list box (hence the name of the file). As this is 'data driven' any addition of deletion of an option from the referenced table in question, e.g. a Statuses table in your case, would automatically be reflected in the list box, so no amendment to the form's design is required.