Drop downs autofill on subforms question
I have a script on a form called billing form that autofills information from a Form called Add Kids Form and Add Parents Form I understand this does not work on subforms because of some issues and I've read up on it, but I still don't understand how to implement it on a subform. Can you please help me rewrite the code below so it would work on a subform? And please tell me where to place the code. Thank you.
the script is:
- if((input.Select_Child != null))
- {
- rec = Add_Kids_Form[ID == input.Select_Child];
- //fetching that particular record into a User defined variable rec
- Daily_Rate=rec.kid_rate;
- //assigning corresponding values
- parentrec=rec.Parent_Name;
- newparentrec = Add_Parents_Form[ID == parentrec];
- Copay=newparentrec.dhs_copay;
- }