I have 2 tables as follows;
Shipments .................Invoices
SId (PK)......................IId
LoadNumber ................S_SId
CargoId ......................InvoiceType (10 Types)
ContractId ..................InvoiceSubType (4 Sub Types)
Etc ............................DateReceived
.................................Amount
.................................PaymentRef
................................ Etc
They are linked 1 to Many on SID ------ S_SId
With 10 Types of Invoice and 4 subtypes for each there could be as many as 40 Invoice Type/Sub Type combinations.
I have used a cross tab query and a select query called InvoicesExpected to establish which invoices have arrived (shown in the results as the "SI_ID") and which are not required (N/A) or have not been received yet (Date Due). I now have a result table which looks like this;
SId ........Type1_Sub1 ........Type1_Sub2 .............Type2_Sub1 ..........Type2_Sub2
1 ............1 ..........................6 ................................05/08/09 .................N/A
2 ............N/A......................8.................................N/A .........................06/07/09
3.............7..........................10................................11............................08/08/09
My aim is to produce a form called “Compliance” which tells the user for each shipment;
1. Each invoices due date. (If the invoice is expected)
2. All the data in the Shipment Invoices table. (If the invoice has arrived)
3. N/A. (If the invoice is not expected.)
4. Missing (If the due date has passed and there is no SI_ID.)
The form would look like this;
SId # 1 ..........Due ..........Date Received ..........Amount ...........PaymentRef
Type1_Sub1...01/01/10.....01/01/10 ....................$ 1,000,000 ........... 089
Type1_Sub2...05/01/10 .....MISSING ........................ - ...................... -
Type2_Sub1...05/08/09......04/08/09...................$ 3,456....................056
Type2_Sub2...N/A.............N/A............................N/A.........................N/A
I guess the final consideration is that I need to be able to split the database and I would like to be able to update the fields if possible.
I have previously tried union queries but the number of links exceeded the number jet can handle when I split the DB (it worked well before I split it). Reading around that issue suggested keeping things like Dlookup to a minimum so I guess that may not be a solution here.
I am really stuck on this one, any help would be most appreciated.
Shipments .................Invoices
SId (PK)......................IId
LoadNumber ................S_SId
CargoId ......................InvoiceType (10 Types)
ContractId ..................InvoiceSubType (4 Sub Types)
Etc ............................DateReceived
.................................Amount
.................................PaymentRef
................................ Etc
They are linked 1 to Many on SID ------ S_SId
With 10 Types of Invoice and 4 subtypes for each there could be as many as 40 Invoice Type/Sub Type combinations.
I have used a cross tab query and a select query called InvoicesExpected to establish which invoices have arrived (shown in the results as the "SI_ID") and which are not required (N/A) or have not been received yet (Date Due). I now have a result table which looks like this;
SId ........Type1_Sub1 ........Type1_Sub2 .............Type2_Sub1 ..........Type2_Sub2
1 ............1 ..........................6 ................................05/08/09 .................N/A
2 ............N/A......................8.................................N/A .........................06/07/09
3.............7..........................10................................11............................08/08/09
My aim is to produce a form called “Compliance” which tells the user for each shipment;
1. Each invoices due date. (If the invoice is expected)
2. All the data in the Shipment Invoices table. (If the invoice has arrived)
3. N/A. (If the invoice is not expected.)
4. Missing (If the due date has passed and there is no SI_ID.)
The form would look like this;
SId # 1 ..........Due ..........Date Received ..........Amount ...........PaymentRef
Type1_Sub1...01/01/10.....01/01/10 ....................$ 1,000,000 ........... 089
Type1_Sub2...05/01/10 .....MISSING ........................ - ...................... -
Type2_Sub1...05/08/09......04/08/09...................$ 3,456....................056
Type2_Sub2...N/A.............N/A............................N/A.........................N/A
I guess the final consideration is that I need to be able to split the database and I would like to be able to update the fields if possible.
I have previously tried union queries but the number of links exceeded the number jet can handle when I split the DB (it worked well before I split it). Reading around that issue suggested keeping things like Dlookup to a minimum so I guess that may not be a solution here.
I am really stuck on this one, any help would be most appreciated.