Updating subform

Hi, basically i have a database of parents and children, i want to populate the sales order subform with the children of the parent(sell-to customer no.) selected in the header form with some other details from other tables.

example of parent code ada001

example of child code ada001-01

So if for example one parent has two children two lines should appear on the subform one being ada001-01 and ada001-02.

I have been able to SETFILTER by ParentNo* thus getting all related records to one specific parent but how can i display all the records obtained from SETFILTER onto the subform. For the moment i can display one child only like ada001-01 only.

BTW i am really a newbie at it, so maybe you could give a sample code or give some directions. I hope i wrote it clear enough if it isnt let me know


Do you want to insert lines to sales order subform automatically after selecting sell-to-customer in the header ?

if so create a function in the subform ,cal the function from the header. in the function you filter the records and insert into Sales line table

cal the function like below



Jerome Marshal. J

Actually i want children codes from Contacts table to be populated automatically based on the sell-to customer no. also from customer table, thanks for your suggestion marshal but i do not want to insert anything in the sales line table yet.

Basically if parent A was entered in the header, in the subform parent A’s child that is A-01 and A-02 should appear on different lines. From there i’ll try linking the child code to get some predefined fees.