I've searched around for the answer to this and can't seem to find a solution for my particular situation. I have a form with two subforms. The two subforms are not like one is the subform of the other. They are both on the same level inside the main form. The main form does not have a table or query assigned to it. I'm trying to get subform2 to show all records associated with an ID in the current record in subform1. So I'm using the "On Current" even in subform1 to trigger the code that is supposed to change the RecordSource in subform2. The problem is that I keep getting errors when trying to reference the RecordSource property of subform2 from within subform1. The way I'm referencing it is:
Me.Parent![Item-Activity subform].Form.RecordSource
The way I'm testing it is that I have "MsgBox Me.Parent![Item-Activity subform].Form.RecordSource" and that triggers the error:
"You entered an expression that has an invalid reference to the property Form/Report.
I don't know what is wrong with my reference. Maybe there is a better way to do this?
The reason for the two subforms inside the main form is because I want both forms to be in Datasheet View only. If I try to assign the "parent" form to the main form, make it Datasheet View, and then add the "child" form as a subform, the result is the "parent" form with "+" signs. The "+" signs open up to the associated records in the subform. At first I thought this was kind of neat, but actually I don't like this. I want the two tables to be separate -- and both in Datasheet View. If there is an optimal way to achieve this I'm all ears.