I am pulling my hair here.
I want to link 2 subform fields to a field in the main form.
Parent.MyFieldName.Column(3) for the control source of the first subform field and it is displayed fine. The Row source of my second subform field is using the first subform field as a criteria for its query.
The problem is that this combobox remains empty when I use the above code but is populated if I give the first field a constant value.
Feels like the combobox is getting filled before the retrieval of data from the first subform field.
I tried moving the above code form control source to default value but then both fields remain empty.
What am I doing wrong?Answer1:
I have found the main reason why things weren't working - Subform controls load before the rest of the main form. This means that at the time my subform dropdown menu seeks the data in the other form fields they still haven't appeared and thus I am left with an empty dropdown menu.
I solved this by removing the sourceobject of the subform control and adding
Me!Subform1.SourceObject = "SubformOtpuskaneIzhMat"
In some events in the main form.