Hello. I'm designing an invoice database where you can enter Sales done to the clients, under where you choose service, hours done, employees who did the work etc. After submitting the sale it will be stored to table called 'Sales' and after setting 'Sale Complete' it will be ready to be invoiced at the end of the month. Now under 'Create Invoice' form when I choose a client, it's gonna display me all the sales related to that client that are marked as complete and are not invoiced yet. When I submit an invoice then 'InvoiceNumber' is generated which will be added to both 'Invoices' table and also to 'Sales' table. The reason is that I need to see what sales were added to that specific invoice later on, under 'Paid' tab.
Now the solution I am looking for is that how I can get my subform to filter 2 different queries. One query selects all sales related to that client which are not complete. And now do I need another query that displays me sales that are pinned to Paid invoice or how I can achieve that? Right now what is happening is that whenever I open Paid invoice it shows me 0 results in subform because subform source object is query that selects only completed invoices. But I need it to display sales that have same InvoiceNumber with the opened form InvoiceNumber. Hope it makes sense.
Regards.