Solved How to quickly duplicate Tables & associated subforms within a main form

I could also use the Filter command. No need for a query. It's even cooler. I can teach it to family members in a few minutes. It's right there in the Property Sheet
OMG! There is no teaching anybody anything. There is nothing for the user to do. You just set the rowsource of your different lists based on a query.
 
This section is a main form which will have multiple sub forms (25 sub forms in total). They are for Invoice 1, 2, 3... to 25.

So, you have 25 possible invoices per what? I'm guessing its per project or similar. In a relational database there would be a one-to-many relationship type between Projects and Invoices, to model which you'd have Projects table and an Invoices table. The latter would include a ProjectID or similar foreign key column referencing the ProjectID or similar primary key of the Projects table. Consequently the number of invoices per project will vary.

The image below is the model for a basic invoicing application. This application is primarily intended to demonstrate how to output invoices as PDF files, but it serves to illustrates the basic structure for an invoicing application. The demo does not include a Projects table, but it would be a simple task to add one, and reference it from the Invoices table.

InvoicePDFModel.GIF


A point to notice about this model is that the Invoices table repeats the customer's name and address columns. In this example a decision has been taken that previous invoices will retain the customer's name and address data which were current at the time the invoice was raised. It might alternatively have been decided that previous invoices would reflect the customer's current name and address data.

Note also that the InvoiceDetails table repeats the UnitPrice and TaxRate columns from the Products table. In this case the repetition is mandatory, because previous invoices must retain the values current at the time the invoice was raised, regardless of any subsequent changes in these values in the Products table.

The image below is of the data entry form for entering invoice data. Note that this allows for multiple physical instances of an invoice to be raised where partial payments have been made. In the demo the same invoice number is used per instance, but it might alternatively be decided to create a new invoice number per instance.

InvoiceForm.gif


A copy of the application is attached as a .zip file.

PS: I've just noticed that your original post was in January! Nevertheless, I hope that the above might be helpful, if not to you, at least to the member who has resurrected the thread, and is clearly in need of guidance.
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom