A scenario: Assume there are two tables, like this:
Table1 - Invoices
InvoiceNumber as String
Lots of other fields
Table2 - InvoiceLineItems
InvoiceNumber as string
ItemNr as Long
Lots of other fields
I want to display a form that looks like this:
Expand|Select|Wrap|Line Numbers
- ╔═══════════════════════════════╦═════════════════════════════════╗
- ║ MAIN FORM - SPLIT VIEW ║ SUBFORM (SAME FORM USED TWICE ║
- ║ .-------------------------. ║ .---------------------. ║
- ║ | AREA 1 (form view) | ║ | SUBFORM-Datasheet | ║
- ║ | InvoiceNumber | ║ | ItemNr = 1 | ║
- ║ | Lots of other fields | ║ | ItemNr = 2 | ║
- ║ '-------------------------' ║ '---------------------' ║
- ║ .-------------------------. ║ .----------------------. ║
- ║ | AREA 2 (datasheet) | ║ | SUBFORM-FormView | ║
- ║ | Line 1 | ║ | Field-1 Field-2 | ║
- ║ | Line 2 (etc) | ║ | Field-3 Field-4 | ║
- ║ '-------------------------' ║ `----------------------' ║
- ╚═══════════════════════════════╩═════════════════════════════════╝
1) Click on an invoice in the datasheet view (Area 2)
2) Corresponding invoice data appears in Area 1
3) The data from InvoiceLineItems should appear in the subform-Datasheet
4) Click on a row in Subform-Datasheet - details should display in the Subform-FormView
I'm basically trying to emulate what would happen if Access allowed split display in a subform. To be clearer, the Invoice-Item is the same in both subforms. It's the display mode that changes.
I'm using Windows 10 and Access 2013.
Upgrading to different version of Access is not an option.
Installing any third-party add-ons is not an option
I am allowed to add code and am allowed to use system functions.