Dear friend,
I have been looking all over this forum for a topic like "form-subform". I was trying to catch up with the idea if a form-subform can be made to work programmatically.
I know on how to make a "form-subform" work when they are bound but what if they are unbound.
1) I have an unbound masterForm (FORM1) that gets its recordset on the Load-Event and populates the textBoxes (unbound) accordingly.
2) I also have an unbound subForm (FORM2) that gets its recordsource on the Load-Event. The recordsource is an SQL SELECT statement with criteria (eg. masterForm!textboxID).
3) I have an unbound childSubForm (FORM3) on the masterForm that gets its sourceObject as the subForm (FORM2) on the Load-Event of the masterForm.
4) I have attempted to create a link between the masterForm (FORM1) and subForm (FORM2) in the Load-event programmatically (eg. FORM3.LinkMasterField="ID", FORM3.LinkChildField="ID")
5) On the onCurrent-Event of the masterForm (FORM1) the SQL statement is assigned to the RecordSource of the subForm (FORM2).
6) Its working except when I navigate to the next record on the masterForm (FORM1) the subForm (FORM2) does not seem to display the corresponding record(s). The subForm (FORM2) is blank.
It seems that everything is in place, however, its not working. Am sure that something is wrong that I am not able to find out. Need help in this regard.
Regards,
Prodigy...
I have been looking all over this forum for a topic like "form-subform". I was trying to catch up with the idea if a form-subform can be made to work programmatically.
I know on how to make a "form-subform" work when they are bound but what if they are unbound.
1) I have an unbound masterForm (FORM1) that gets its recordset on the Load-Event and populates the textBoxes (unbound) accordingly.
2) I also have an unbound subForm (FORM2) that gets its recordsource on the Load-Event. The recordsource is an SQL SELECT statement with criteria (eg. masterForm!textboxID).
3) I have an unbound childSubForm (FORM3) on the masterForm that gets its sourceObject as the subForm (FORM2) on the Load-Event of the masterForm.
4) I have attempted to create a link between the masterForm (FORM1) and subForm (FORM2) in the Load-event programmatically (eg. FORM3.LinkMasterField="ID", FORM3.LinkChildField="ID")
5) On the onCurrent-Event of the masterForm (FORM1) the SQL statement is assigned to the RecordSource of the subForm (FORM2).
6) Its working except when I navigate to the next record on the masterForm (FORM1) the subForm (FORM2) does not seem to display the corresponding record(s). The subForm (FORM2) is blank.
It seems that everything is in place, however, its not working. Am sure that something is wrong that I am not able to find out. Need help in this regard.
Regards,
Prodigy...