Hello everyone.
I have a database of a chemical laboratory.
So far, I've been making one analytical report - one invoice. But some regular clients are asking us to simplify (for them) by giving an only invoice for all the services.
I planned it this way:
- 1 new table (tblMultipleInvoice) linked to my main table (tblAnalysis) by the InvoiceNumber field in both tables. I also added a new checkbox to the analysis table that marks it as "invoiced with others" and also allows me to select it when building the invoice.
- the form is opened through the Clients form, so it filters the records that can be invoiced together.
- the records are listed, I check the box to select items and I open a new MultipleInvoice form with them that allows me to add calculation fields and date, etc.
This is theory. Practice was an epic fail.
I tried many ways to update the provided invoice number in all the checked records and I never succeeded (I know, this is not the place to post the issue).
But after solving that I'm going to face another technical problem. I will have to open a form-subform with a new tblMultipleInvoice record, provide the InvoiceNumber by code and then, refresh the subform with all the tblAnalysis records for that invoice. Too hard for me.
So before keeping on this hard way I've chosen, I want to ask you guys if this design is appropriate for what I want to do or if there is a better way.
I would also ask you for samples if possible.
Thanks in advance.
P.S.: I know I am doing it in the opposite way, because the natural in databases is to first create the invoice and then add the items by the subform.