This all works fine, until changing the query to add a table that has a many-to-one relationship with the original table. If this is in place, AND the query has a condition that selects no records, then there is an error triggered in the form load event. "Run-time error '2455': You have entered an expression that has an invalid reference to the property Form/Report."
I have cut the problem down to the absolute minimum that causes the error - in the attached file.
The VBA code is:
Expand|Select|Wrap|Line Numbers
- Private WithEvents frmSMSSubform As Access.Form
- Private Sub Form_Load()
- Set frmSMSSubform = Me.subform.Form
- End Sub
I can find a workaround but would like to understand what is going wrong.
Thanks
main form event from subform data.zip