My database has the following:
2 forms titled form1 and sub_form2
2 queries titled sortbyfirstname, sortbylastname
1 table titled Names
On form1 there is subform2 two optionboxes(optionbox1 and optionbox2)
When a user chooses optionbox1 then it runs the following code:
[Forms]![sub_form2].RecordSource = "sortbyfirstname"
When a user chooses optionbox2 then it runs the following code:
[Forms]![sub_form2].RecordSource = "sortbylastname"
When I open both forms, I notice that the above code changes subform2, but form1 there is no change. I have tried docmd.requery sub_form2 but the subform in form 1 does not change. Does anyone know why. Can anyone help me figure out what to do to make the subform refresh when its recordsource is changed?