A family of Microsoft relational database management systems designed for ease of use.
So we are still in the dark as to the reason for the error which you experienced. My concern is that you have treated the symptom rather than the disease. In your shoes I would temporarily change the button's On Click event property to an event procedure and put the code in the event procedure:
DoCmd.OpenForm "frmAssessmentDetailforSubForm", _
WhereCondition:="[AssessmentSessionID] = " & Me.[AssessmentSessionID]
Don't save the form, just switch back to form view and click the button. You'll then be able to close it without saving and it will revert back to using the macro. If you get the error again it points to a more fundamental problem, which could cause trouble in other contexts. If it opens the form successfully, then I'd breathe more easily.
BTW, in case you're wondering why the above code is spread over two lines, this is purely for readability. The underscore character at the end of the first line is a continuation character and allows you to put the remaining code on a separate line. It executes as a single line, however.
One other point: the term 'subform' has a very specific meaning; it's a form which is embedded in a parent for as the source object of a subform control. What you now have are what might be termed 'linked forms' although the term has no formal meaning.