Hi guys
I have a form and subform where the subform’s data is created BEFORE the main form.
I guess in the normal flow, the parent record is created first and then the children. E.g. invoice header first and then invoice lines.
However, I want to build a form where you select which invoices you want to pay. So I’m thinking that the parent form should be payments and in the child form it should show all the invoices that’s unpaid. Once you select the invoices and the payment is created, the form should in future only show you the invoices paid by that payment.
so my invoice table will have a payment_id field.
In the beginning the subform should show where payment_id is null. Once payment status=saved/paid or something the logic of the subform should change to show where payment_id = main form payment ID.
I dont know how to modify my subform to implement this. Should I base it on SQL query? How do I pull in the value of the main form into the SQL statement to get the payment_id?
Is my model wrong?
Maybe I can start with a form with only listing the invoices and checkboxes against them and when you check some and press a button, a macro will create a payment record and update all the ticket invoices. But how do I page through selected records in a macro?