I have a subform sitting on the mainform. I have a fetch record deluge script. Two issues. First issue, I cannot do a sort on the records on the form unlike reports. Second, the records pulled up on the subform are duplicated atleast twice. Below is my deluge:
fet = All_Table_Donations[Fk_Sponsor_ID == input.Child_Name.Sponsor_ID];
input.Sponsor_ID = input.Child_Name;
input.Birth_Date = input.Child_Name.Birth_Date;
input.Sponsor = input.Child_Name.Sponsor;
input.Surname = input.Child_Name.Surname;
input.Current = input.Child_Name.Current;
input.Email = input.Child_Name.Email;
rows = Collection();
for each rec in fet
{
//alert rec.Fk_Sponsor_ID;
//alert rec.Paid_Up_To;
//alert rec.Amount;
//alert rec.KAmount;
row1 = Child_and_Sponsors1.Sponsorship_and_Payments();
row1.Fk_Sponsor_ID=rec.Fk_Sponsor_ID;
row1.Amount=rec.Amount;
row1.KAmount=rec.KAmount;
row1.Notes=rec.Notes;
row1.Paid_Up_To=rec.Paid_Up_To;
row1.Statement_Date=rec.Statement_Date;
rows.insert(row1);
}
input.Sponsorship_and_Payments.insert(rows);