
Originally Posted by
John_G
Glad you got it to work.
Subforms are not part of the Forms! collection, even when they are open, so you cannot refer to them that way. (Forms![Wirelist Form]![Wirelist subform].OrderBy = "[Wire]").
What you have to do is use the name of the subform container control on the main form, and then refer to the subform within it. For example, let's assume you names the subform control (on the main form) sfrmContainer.
Your expressions would now look like this:
Forms![Wirelist Form]![sfrmContainer].form.OrderBy = "[Wire]"
Forms![Wirelist Form]![sfrmContainer].form.OrderByOn = True