Hey all,
I have a form with a subform. The subform is a datasheet, and on the form are the options for sorting and filtering the datasheet. All nice and well. BUT…
I would like my users to be able to sort and filter the subform and for those changes to be reflected in the main form, as if they had picked them from the main menu.
Currently I’m doing it by code in the Exit of each control in the subform, like this:
Private Sub Name_Exit(Cancel As Integer)
Forms!frmMain!cboSort.Value = Me.OrderBy
End Sub
But I was wondering if there were a global way of doing it (as opposed to checking each control individually)? Originally I tried to use the Current of the form, which is fine if users only sort and filter in the subform, but if they choose from the main menu then I get an error and I can’t seem to figure out a way to distinguish between the two. The dirty property doesn’t work (I get an error), and I can’t find an exit event to check.
Any ideas?