Case 3: creating invoices
An invoice in Access is not a document but a record with lines. You calculate the amounts per line and build the customer card that shows a customer's invoices.
In short: net is [Quantity]*[UnitPrice], gross [Quantity]*[UnitPrice]*(1+[TaxRate]). The invoice number 2026-0035 goes into the criterion in quotes. On the customer card the subform links through CustomerID, and DCount counts the invoices without a payment date.
Task 1: amounts per line
Task For invoice 2026-0035 you need the amounts per line. Show Service, Quantity, UnitPrice, Net (Quantity times UnitPrice) and Gross (Net times 1 plus TaxRate).
Invoices 90 rows, 7 columns
| InvoiceID | InvoiceNo | CustomerID | InvoiceDate | DueDate | PaidOn | ReminderLevel |
|---|---|---|---|---|---|---|
| 1 | 2025-0001 | 9 | 17 Jan 2025 | 16 Feb 2025 | 8 Mar 2025 | 1 |
| 2 | 2025-0002 | 7 | 4 Feb 2025 | 18 Feb 2025 | 11 Mar 2025 | 1 |
| 3 | 2025-0003 | 2 | 12 Feb 2025 | 14 Mar 2025 | 4 Apr 2025 | 1 |
| 4 | 2025-0004 | 12 | 15 Feb 2025 | 17 Mar 2025 | 19 Feb 2025 | 0 |
| 5 | 2025-0005 | 9 | 15 Feb 2025 | 17 Mar 2025 | 10 Apr 2025 | 1 |
| 6 | 2025-0006 | 4 | 22 Feb 2025 | 24 Mar 2025 | 2 | |
| 7 | 2025-0007 | 15 | 4 Mar 2025 | 3 Apr 2025 | 23 Apr 2025 | 1 |
| 8 | 2025-0008 | 5 | 14 Mar 2025 | 13 Apr 2025 | 24 Apr 2025 | 0 |
| 9 | 2025-0009 | 4 | 5 Apr 2025 | 5 May 2025 | 17 Apr 2025 | 0 |
| 10 | 2025-0010 | 2 | 13 Apr 2025 | 13 May 2025 | 6 May 2025 | 0 |
| 11 | 2025-0011 | 23 | 17 Apr 2025 | 17 May 2025 | 26 May 2025 | 0 |
| 12 | 2025-0012 | 18 | 20 Apr 2025 | 4 May 2025 | 15 May 2025 | 0 |
| 13 | 2025-0013 | 16 | 25 Apr 2025 | 25 May 2025 | 27 May 2025 | 0 |
| 14 | 2025-0014 | 21 | 9 May 2025 | 8 Jun 2025 | 9 Jun 2025 | 0 |
| 15 | 2025-0015 | 4 | 14 May 2025 | 13 Jun 2025 | 19 May 2025 | 0 |
| 16 | 2025-0016 | 16 | 19 May 2025 | 18 Jun 2025 | 20 Jun 2025 | 0 |
| 17 | 2025-0017 | 16 | 17 Jun 2025 | 17 Jul 2025 | 1 Jul 2025 | 0 |
| 18 | 2025-0018 | 24 | 21 Jun 2025 | 5 Jul 2025 | 1 Jul 2025 | 0 |
| 19 | 2025-0019 | 10 | 23 Jun 2025 | 23 Jul 2025 | 10 Aug 2025 | 1 |
| 20 | 2025-0020 | 18 | 23 Jun 2025 | 7 Jul 2025 | 7 Jul 2025 | 0 |
| 21 | 2025-0021 | 2 | 2 Jul 2025 | 1 Aug 2025 | 2 | |
| 22 | 2025-0022 | 17 | 5 Jul 2025 | 19 Jul 2025 | 25 Jul 2025 | 0 |
| 23 | 2025-0023 | 17 | 11 Jul 2025 | 25 Jul 2025 | 31 Jul 2025 | 0 |
| 24 | 2025-0024 | 10 | 12 Jul 2025 | 11 Aug 2025 | 19 Aug 2025 | 0 |
| 25 | 2025-0025 | 10 | 12 Jul 2025 | 11 Aug 2025 | 1 Sep 2025 | 1 |
| 26 | 2025-0026 | 5 | 11 Aug 2025 | 10 Sep 2025 | 1 Sep 2025 | 0 |
| 27 | 2025-0027 | 17 | 20 Aug 2025 | 3 Sep 2025 | 27 Aug 2025 | 0 |
| 28 | 2025-0028 | 13 | 28 Aug 2025 | 27 Sep 2025 | 31 Aug 2025 | 0 |
| 29 | 2025-0029 | 7 | 31 Aug 2025 | 14 Sep 2025 | 8 Oct 2025 | 1 |
| 30 | 2025-0030 | 13 | 8 Sep 2025 | 8 Oct 2025 | 14 Sep 2025 | 0 |
| 31 | 2025-0031 | 3 | 15 Sep 2025 | 15 Oct 2025 | 24 Oct 2025 | 0 |
| 32 | 2025-0032 | 18 | 4 Oct 2025 | 18 Oct 2025 | 29 Oct 2025 | 0 |
| 33 | 2025-0033 | 23 | 5 Oct 2025 | 4 Nov 2025 | 2 Nov 2025 | 0 |
| 34 | 2025-0034 | 10 | 9 Oct 2025 | 8 Nov 2025 | 25 Oct 2025 | 0 |
| 35 | 2025-0035 | 12 | 17 Oct 2025 | 16 Nov 2025 | 3 Nov 2025 | 0 |
| 36 | 2025-0036 | 20 | 29 Oct 2025 | 12 Nov 2025 | 6 Nov 2025 | 0 |
| 37 | 2025-0037 | 5 | 5 Nov 2025 | 5 Dec 2025 | 25 Nov 2025 | 0 |
| 38 | 2025-0038 | 16 | 12 Nov 2025 | 12 Dec 2025 | 5 Dec 2025 | 0 |
| 39 | 2025-0039 | 21 | 12 Nov 2025 | 12 Dec 2025 | 25 Dec 2025 | 0 |
| 40 | 2025-0040 | 12 | 13 Nov 2025 | 13 Dec 2025 | 22 Dec 2025 | 0 |
| 41 | 2025-0041 | 2 | 14 Nov 2025 | 14 Dec 2025 | 7 Jan 2026 | 1 |
| 42 | 2025-0042 | 19 | 23 Nov 2025 | 23 Dec 2025 | 26 Dec 2025 | 0 |
| 43 | 2025-0043 | 24 | 27 Nov 2025 | 11 Dec 2025 | 5 Dec 2025 | 0 |
| 44 | 2025-0044 | 16 | 29 Nov 2025 | 29 Dec 2025 | 7 Dec 2025 | 0 |
| 45 | 2025-0045 | 15 | 2 Dec 2025 | 1 Jan 2026 | 22 Dec 2025 | 0 |
| 46 | 2025-0046 | 15 | 8 Dec 2025 | 7 Jan 2026 | 7 Jan 2026 | 0 |
| 47 | 2025-0047 | 13 | 17 Dec 2025 | 16 Jan 2026 | 30 Dec 2025 | 0 |
| 48 | 2025-0048 | 17 | 19 Dec 2025 | 2 Jan 2026 | 13 Jan 2026 | 0 |
| 49 | 2025-0049 | 16 | 25 Dec 2025 | 24 Jan 2026 | 16 Feb 2026 | 1 |
| 50 | 2025-0050 | 24 | 26 Dec 2025 | 9 Jan 2026 | 2 Jan 2026 | 0 |
| 51 | 2026-0001 | 3 | 8 Jan 2026 | 7 Feb 2026 | 2 Mar 2026 | 1 |
| 52 | 2026-0002 | 2 | 10 Jan 2026 | 9 Feb 2026 | 22 Feb 2026 | 0 |
| 53 | 2026-0003 | 14 | 20 Jan 2026 | 3 Feb 2026 | 2 Feb 2026 | 0 |
| 54 | 2026-0004 | 14 | 21 Jan 2026 | 4 Feb 2026 | 31 Jan 2026 | 0 |
| 55 | 2026-0005 | 18 | 23 Jan 2026 | 6 Feb 2026 | 23 Feb 2026 | 1 |
| 56 | 2026-0006 | 9 | 25 Jan 2026 | 24 Feb 2026 | 28 Feb 2026 | 0 |
| 57 | 2026-0007 | 13 | 31 Jan 2026 | 2 Mar 2026 | 21 Feb 2026 | 0 |
| 58 | 2026-0008 | 22 | 14 Feb 2026 | 16 Mar 2026 | 23 Mar 2026 | 0 |
| 59 | 2026-0009 | 21 | 14 Feb 2026 | 16 Mar 2026 | 29 Mar 2026 | 0 |
| 60 | 2026-0010 | 17 | 22 Feb 2026 | 8 Mar 2026 | 31 Mar 2026 | 1 |
| 61 | 2026-0011 | 24 | 1 Mar 2026 | 15 Mar 2026 | 22 Mar 2026 | 0 |
| 62 | 2026-0012 | 4 | 6 Mar 2026 | 5 Apr 2026 | 8 Mar 2026 | 0 |
| 63 | 2026-0013 | 4 | 20 Mar 2026 | 19 Apr 2026 | 31 Mar 2026 | 0 |
| 64 | 2026-0014 | 17 | 24 Mar 2026 | 7 Apr 2026 | 27 Apr 2026 | 1 |
| 65 | 2026-0015 | 9 | 2 Apr 2026 | 2 May 2026 | 11 Apr 2026 | 0 |
| 66 | 2026-0016 | 13 | 6 Apr 2026 | 6 May 2026 | 31 May 2026 | 1 |
| 67 | 2026-0017 | 2 | 27 Apr 2026 | 27 May 2026 | 13 May 2026 | 0 |
| 68 | 2026-0018 | 14 | 12 May 2026 | 26 May 2026 | 31 May 2026 | 0 |
| 69 | 2026-0019 | 12 | 23 May 2026 | 22 Jun 2026 | 10 Jun 2026 | 0 |
| 70 | 2026-0020 | 8 | 2 Jun 2026 | 2 Jul 2026 | 20 Jun 2026 | 0 |
| 71 | 2026-0021 | 4 | 5 Jun 2026 | 5 Jul 2026 | 12 Jul 2026 | 0 |
| 72 | 2026-0022 | 10 | 16 Jun 2026 | 16 Jul 2026 | 30 Jun 2026 | 0 |
| 73 | 2026-0023 | 18 | 16 Jun 2026 | 30 Jun 2026 | 27 Jun 2026 | 0 |
| 74 | 2026-0024 | 24 | 17 Jun 2026 | 1 Jul 2026 | 17 Jul 2026 | 1 |
| 75 | 2026-0025 | 20 | 20 Jun 2026 | 4 Jul 2026 | 12 Jul 2026 | 0 |
| 76 | 2026-0026 | 7 | 19 Jul 2026 | 2 Aug 2026 | 2 | |
| 77 | 2026-0027 | 20 | 8 Aug 2026 | 22 Aug 2026 | 10 Aug 2026 | 0 |
| 78 | 2026-0028 | 13 | 24 Aug 2026 | 23 Sep 2026 | 30 Sep 2026 | 0 |
| 79 | 2026-0029 | 24 | 25 Aug 2026 | 8 Sep 2026 | 21 Sep 2026 | 0 |
| 80 | 2026-0030 | 4 | 30 Aug 2026 | 29 Sep 2026 | 2 Oct 2026 | 0 |
| 81 | 2026-0031 | 2 | 1 Sep 2026 | 1 Oct 2026 | 22 Sep 2026 | 0 |
| 82 | 2026-0032 | 21 | 15 Sep 2026 | 15 Oct 2026 | 2 | |
| 83 | 2026-0033 | 16 | 15 Sep 2026 | 15 Oct 2026 | 14 Oct 2026 | 0 |
| 84 | 2026-0034 | 8 | 27 Sep 2026 | 27 Oct 2026 | 1 | |
| 85 | 2026-0035 | 12 | 28 Sep 2026 | 28 Oct 2026 | 1 | |
| 86 | 2026-0036 | 5 | 6 Nov 2026 | 6 Dec 2026 | 0 | |
| 87 | 2026-0037 | 13 | 7 Nov 2026 | 7 Dec 2026 | 19 Nov 2026 | 0 |
| 88 | 2026-0038 | 24 | 11 Nov 2026 | 25 Nov 2026 | 0 | |
| 89 | 2026-0039 | 9 | 17 Nov 2026 | 17 Dec 2026 | 0 | |
| 90 | 2026-0040 | 14 | 21 Nov 2026 | 5 Dec 2026 | 0 |
InvoiceLines 196 rows, 6 columns
| LineID | InvoiceID | ServiceID | Quantity | UnitPrice | TaxRate |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 4 | 120.00 | 0 |
| 2 | 2 | 5 | 2.5 | 95.00 | 0 |
| 3 | 3 | 7 | 1 | 60.00 | 0.2 |
| 4 | 3 | 5 | 12 | 95.00 | 0.2 |
| 5 | 3 | 1 | 7 | 108.00 | 0.2 |
| 6 | 3 | 3 | 1 | 490.00 | 0.2 |
| 7 | 4 | 1 | 8.5 | 120.00 | 0.2 |
| 8 | 4 | 5 | 9 | 95.00 | 0.2 |
| 9 | 4 | 4 | 6 | 180.00 | 0.2 |
| 10 | 4 | 7 | 1 | 54.00 | 0.2 |
| 11 | 5 | 5 | 11.5 | 95.00 | 0 |
| 12 | 6 | 3 | 1 | 441.00 | 0.2 |
| 13 | 6 | 4 | 3 | 162.00 | 0.2 |
| 14 | 6 | 6 | 4 | 35.91 | 0 |
| 15 | 6 | 7 | 1 | 60.00 | 0.2 |
| 16 | 7 | 6 | 7 | 39.90 | 0 |
| 17 | 7 | 4 | 6 | 180.00 | 0.2 |
| 18 | 7 | 1 | 9 | 120.00 | 0.2 |
| 19 | 7 | 5 | 5.5 | 95.00 | 0.2 |
| 20 | 8 | 6 | 1 | 39.90 | 0 |
| 21 | 8 | 1 | 6.5 | 120.00 | 0 |
| 22 | 8 | 3 | 1 | 490.00 | 0 |
| 23 | 9 | 2 | 3 | 855.00 | 0.2 |
| 24 | 9 | 1 | 4.5 | 108.00 | 0.2 |
| 25 | 10 | 3 | 1 | 441.00 | 0.2 |
| 26 | 10 | 6 | 2 | 39.90 | 0 |
| 27 | 10 | 1 | 5 | 120.00 | 0.2 |
| 28 | 11 | 4 | 3 | 180.00 | 0.2 |
| 29 | 11 | 7 | 1 | 60.00 | 0.2 |
| 30 | 11 | 5 | 10 | 95.00 | 0.2 |
| 31 | 12 | 3 | 1 | 490.00 | 0 |
| 32 | 12 | 6 | 12 | 39.90 | 0 |
| 33 | 12 | 5 | 6.5 | 85.50 | 0 |
| 34 | 13 | 5 | 7.5 | 85.50 | 0.2 |
| 35 | 14 | 6 | 9 | 39.90 | 0 |
| 36 | 15 | 6 | 11 | 35.91 | 0 |
| 37 | 15 | 5 | 4.5 | 95.00 | 0.2 |
| 38 | 16 | 5 | 5.5 | 85.50 | 0.2 |
| 39 | 16 | 2 | 2 | 950.00 | 0.2 |
| 40 | 16 | 3 | 1 | 490.00 | 0.2 |
| 41 | 17 | 6 | 2 | 39.90 | 0 |
| 42 | 18 | 7 | 1 | 60.00 | 0.2 |
| 43 | 19 | 4 | 6 | 180.00 | 0 |
| 44 | 19 | 1 | 1.5 | 120.00 | 0 |
| 45 | 19 | 6 | 1 | 39.90 | 0 |
| 46 | 19 | 7 | 1 | 60.00 | 0 |
| 47 | 20 | 4 | 6 | 180.00 | 0 |
| 48 | 21 | 3 | 1 | 441.00 | 0.2 |
| 49 | 21 | 2 | 2 | 950.00 | 0.2 |
| 50 | 21 | 4 | 1 | 180.00 | 0.2 |
| 51 | 21 | 5 | 10 | 95.00 | 0.2 |
| 52 | 22 | 2 | 3 | 950.00 | 0 |
| 53 | 22 | 5 | 11 | 95.00 | 0 |
| 54 | 22 | 1 | 10.5 | 108.00 | 0 |
| 55 | 22 | 7 | 1 | 54.00 | 0 |
| 56 | 23 | 6 | 11 | 39.90 | 0 |
| 57 | 23 | 2 | 1 | 950.00 | 0 |
| 58 | 24 | 1 | 1 | 120.00 | 0 |
| 59 | 24 | 3 | 1 | 441.00 | 0 |
| 60 | 24 | 4 | 1 | 180.00 | 0 |
| 61 | 25 | 2 | 3 | 950.00 | 0 |
| 62 | 26 | 7 | 1 | 60.00 | 0 |
| 63 | 26 | 1 | 5 | 120.00 | 0 |
| 64 | 26 | 3 | 1 | 490.00 | 0 |
| 65 | 27 | 7 | 1 | 60.00 | 0 |
| 66 | 27 | 4 | 6 | 180.00 | 0 |
| 67 | 28 | 4 | 6 | 180.00 | 0.2 |
| 68 | 29 | 2 | 1 | 855.00 | 0 |
| 69 | 29 | 7 | 1 | 60.00 | 0 |
| 70 | 29 | 3 | 1 | 490.00 | 0 |
| 71 | 29 | 5 | 8 | 95.00 | 0 |
| 72 | 30 | 7 | 1 | 60.00 | 0.2 |
| 73 | 30 | 2 | 1 | 950.00 | 0.2 |
| 74 | 30 | 1 | 1 | 120.00 | 0.2 |
| 75 | 31 | 6 | 1 | 39.90 | 0 |
| 76 | 32 | 5 | 10 | 95.00 | 0 |
| 77 | 32 | 3 | 1 | 441.00 | 0 |
| 78 | 32 | 2 | 1 | 950.00 | 0 |
| 79 | 33 | 6 | 11 | 39.90 | 0 |
| 80 | 33 | 5 | 9.5 | 95.00 | 0.2 |
| 81 | 33 | 1 | 5 | 120.00 | 0.2 |
| 82 | 34 | 5 | 10.5 | 95.00 | 0 |
| 83 | 34 | 2 | 1 | 950.00 | 0 |
| 84 | 35 | 7 | 1 | 60.00 | 0.2 |
| 85 | 35 | 4 | 1 | 180.00 | 0.2 |
| 86 | 35 | 1 | 4 | 120.00 | 0.2 |
| 87 | 36 | 4 | 6 | 180.00 | 0.2 |
| 88 | 37 | 2 | 3 | 950.00 | 0 |
| 89 | 37 | 5 | 6 | 95.00 | 0 |
| 90 | 37 | 3 | 1 | 490.00 | 0 |
| 91 | 37 | 6 | 11 | 39.90 | 0 |
| 92 | 38 | 4 | 3 | 180.00 | 0.2 |
| 93 | 38 | 5 | 1.5 | 95.00 | 0.2 |
| 94 | 38 | 6 | 6 | 39.90 | 0 |
| 95 | 39 | 4 | 12 | 180.00 | 0.2 |
| 96 | 39 | 6 | 10 | 39.90 | 0 |
| 97 | 39 | 1 | 7 | 120.00 | 0.2 |
| 98 | 40 | 5 | 2 | 95.00 | 0.2 |
| 99 | 41 | 5 | 5 | 95.00 | 0.2 |
| 100 | 41 | 3 | 1 | 490.00 | 0.2 |
| 101 | 42 | 2 | 1 | 950.00 | 0 |
| 102 | 42 | 1 | 8 | 120.00 | 0 |
| 103 | 43 | 7 | 1 | 60.00 | 0.2 |
| 104 | 44 | 1 | 7 | 108.00 | 0.2 |
| 105 | 45 | 2 | 3 | 950.00 | 0.2 |
| 106 | 46 | 7 | 1 | 60.00 | 0.2 |
| 107 | 46 | 4 | 3 | 180.00 | 0.2 |
| 108 | 47 | 7 | 1 | 60.00 | 0.2 |
| 109 | 48 | 6 | 10 | 35.91 | 0 |
| 110 | 49 | 7 | 1 | 54.00 | 0.2 |
| 111 | 49 | 3 | 1 | 490.00 | 0.2 |
| 112 | 50 | 2 | 3 | 855.00 | 0.2 |
| 113 | 50 | 7 | 1 | 60.00 | 0.2 |
| 114 | 50 | 4 | 1 | 180.00 | 0.2 |
| 115 | 50 | 3 | 1 | 490.00 | 0.2 |
| 116 | 51 | 5 | 6.5 | 85.50 | 0 |
| 117 | 51 | 6 | 1 | 39.90 | 0 |
| 118 | 52 | 2 | 2 | 950.00 | 0.2 |
| 119 | 53 | 6 | 12 | 39.90 | 0 |
| 120 | 54 | 6 | 6 | 39.90 | 0 |
| 121 | 54 | 1 | 1 | 120.00 | 0.2 |
| 122 | 54 | 2 | 3 | 950.00 | 0.2 |
| 123 | 55 | 7 | 1 | 60.00 | 0 |
| 124 | 55 | 4 | 6 | 180.00 | 0 |
| 125 | 55 | 3 | 1 | 441.00 | 0 |
| 126 | 56 | 4 | 3 | 180.00 | 0 |
| 127 | 56 | 2 | 1 | 950.00 | 0 |
| 128 | 56 | 5 | 9.5 | 95.00 | 0 |
| 129 | 56 | 3 | 1 | 490.00 | 0 |
| 130 | 57 | 4 | 12 | 162.00 | 0.2 |
| 131 | 57 | 2 | 1 | 950.00 | 0.2 |
| 132 | 58 | 6 | 10 | 39.90 | 0 |
| 133 | 58 | 2 | 2 | 950.00 | 0.2 |
| 134 | 58 | 1 | 3 | 120.00 | 0.2 |
| 135 | 59 | 7 | 1 | 60.00 | 0.2 |
| 136 | 60 | 2 | 3 | 950.00 | 0 |
| 137 | 61 | 1 | 8.5 | 108.00 | 0.2 |
| 138 | 62 | 5 | 4 | 95.00 | 0.2 |
| 139 | 63 | 1 | 2 | 108.00 | 0.2 |
| 140 | 63 | 7 | 1 | 60.00 | 0.2 |
| 141 | 64 | 5 | 2 | 95.00 | 0 |
| 142 | 65 | 6 | 5 | 39.90 | 0 |
| 143 | 66 | 6 | 12 | 39.90 | 0 |
| 144 | 66 | 3 | 1 | 490.00 | 0.2 |
| 145 | 67 | 7 | 1 | 60.00 | 0.2 |
| 146 | 67 | 3 | 1 | 490.00 | 0.2 |
| 147 | 68 | 6 | 12 | 39.90 | 0 |
| 148 | 68 | 3 | 1 | 490.00 | 0.2 |
| 149 | 69 | 5 | 3 | 95.00 | 0.2 |
| 150 | 70 | 5 | 6.5 | 95.00 | 0 |
| 151 | 70 | 7 | 1 | 60.00 | 0 |
| 152 | 70 | 2 | 2 | 855.00 | 0 |
| 153 | 71 | 5 | 1 | 95.00 | 0.2 |
| 154 | 72 | 1 | 7 | 120.00 | 0 |
| 155 | 72 | 5 | 5 | 95.00 | 0 |
| 156 | 73 | 7 | 1 | 60.00 | 0 |
| 157 | 74 | 3 | 1 | 490.00 | 0.2 |
| 158 | 74 | 4 | 1 | 162.00 | 0.2 |
| 159 | 75 | 4 | 12 | 180.00 | 0.2 |
| 160 | 75 | 2 | 3 | 855.00 | 0.2 |
| 161 | 76 | 6 | 6 | 39.90 | 0 |
| 162 | 76 | 5 | 7 | 95.00 | 0 |
| 163 | 77 | 2 | 2 | 950.00 | 0.2 |
| 164 | 77 | 1 | 2 | 108.00 | 0.2 |
| 165 | 78 | 5 | 10.5 | 95.00 | 0.2 |
| 166 | 78 | 6 | 9 | 39.90 | 0 |
| 167 | 78 | 4 | 12 | 180.00 | 0.2 |
| 168 | 79 | 4 | 3 | 180.00 | 0.2 |
| 169 | 79 | 1 | 7 | 120.00 | 0.2 |
| 170 | 80 | 5 | 2 | 95.00 | 0.2 |
| 171 | 81 | 5 | 7 | 95.00 | 0.2 |
| 172 | 81 | 4 | 12 | 180.00 | 0.2 |
| 173 | 81 | 3 | 1 | 490.00 | 0.2 |
| 174 | 82 | 7 | 1 | 60.00 | 0.2 |
| 175 | 83 | 2 | 2 | 950.00 | 0.2 |
| 176 | 83 | 1 | 1 | 120.00 | 0.2 |
| 177 | 83 | 4 | 6 | 180.00 | 0.2 |
| 178 | 84 | 6 | 9 | 39.90 | 0 |
| 179 | 84 | 4 | 3 | 180.00 | 0 |
| 180 | 84 | 2 | 3 | 950.00 | 0 |
| 181 | 85 | 2 | 3 | 950.00 | 0.2 |
| 182 | 85 | 5 | 10.5 | 85.50 | 0.2 |
| 183 | 85 | 3 | 1 | 490.00 | 0.2 |
| 184 | 86 | 2 | 1 | 950.00 | 0 |
| 185 | 86 | 6 | 9 | 39.90 | 0 |
| 186 | 86 | 4 | 3 | 180.00 | 0 |
| 187 | 87 | 1 | 9 | 120.00 | 0.2 |
| 188 | 87 | 7 | 1 | 60.00 | 0.2 |
| 189 | 88 | 6 | 3 | 39.90 | 0 |
| 190 | 88 | 3 | 1 | 490.00 | 0.2 |
| 191 | 89 | 3 | 1 | 441.00 | 0 |
| 192 | 89 | 6 | 5 | 39.90 | 0 |
| 193 | 90 | 5 | 4.5 | 95.00 | 0.2 |
| 194 | 90 | 4 | 3 | 162.00 | 0.2 |
| 195 | 90 | 2 | 3 | 950.00 | 0.2 |
| 196 | 90 | 6 | 6 | 39.90 | 0 |
Services 7 rows, 4 columns
| ServiceID | Service | Unit | Price |
|---|---|---|---|
| 1 | Consulting | hour | 120.00 |
| 2 | Workshop | day | 950.00 |
| 3 | Software setup | flat fee | 490.00 |
| 4 | Support plan | month | 180.00 |
| 5 | Training | hour | 95.00 |
| 6 | Database handbook | item | 39.90 |
| 7 | Travel | flat fee | 60.00 |
You write calculated fields with a name and a colon in the Field row, see calculated fields.
Task 2: customer card
Task Build the customer card: the record source is the Customers table. “Company” shows the company, “Terms” the payment terms, the subform “Invoices” the customer's invoices (linked through CustomerID) and “Unpaid” uses DCount to count this customer's invoices without a payment date.
Customers 24 rows, 9 columns
| CustomerID | Company | ContactName | PostalCode | City | Country | PaymentTerms | CustomerSince | |
|---|---|---|---|---|---|---|---|---|
| 1 | Bauer Plumbing Ltd | Henry Davies | 80202 | Denver | USA | henry.davies@example.com | 14 | 16 Sep 2020 |
| 2 | Northlight Publishing | James Walker | EC1A 1BB | London | UK | james.walker@example.com | 30 | 14 May 2024 |
| 3 | Shaw & Partners Accountants | Ava Brown | 02108 | Boston | USA | ava.brown@example.com | 30 | 13 Sep 2020 |
| 4 | Summit Consulting Inc | Grace Taylor | M1 1AE | Manchester | UK | grace.taylor@example.com | 30 | 23 Nov 2020 |
| 5 | City Utilities | Mia Evans | 02108 | Boston | USA | 30 | 25 Jun 2024 | |
| 6 | Market Street Clinic | Olivia Smith | EC1A 1BB | London | UK | olivia.smith@example.com | 30 | 14 Jun 2019 |
| 7 | Roth Legal LLP | Noah Davies | 80202 | Denver | USA | noah.davies@example.com | 14 | 25 Sep 2020 |
| 8 | Weber Logistics | Sophia Smith | 02108 | Boston | USA | sophia.smith@example.com | 30 | 22 Mar 2019 |
| 9 | Krause Bakery | Ava Taylor | 80202 | Denver | USA | ava.taylor@example.com | 30 | 10 Oct 2019 |
| 10 | Lindner Motors | Liam Smith | 80202 | Denver | USA | liam.smith@example.com | 30 | 30 Nov 2021 |
| 11 | Lakeview Hotel | Ava Wilson | G1 1XQ | Glasgow | UK | ava.wilson@example.com | 30 | 5 Sep 2020 |
| 12 | Hansen Printing | Olivia Johnson | EC1A 1BB | London | UK | olivia.johnson@example.com | 30 | 9 Jul 2021 |
| 13 | Fisher Electrical | Mia Clark | BS1 4DJ | Bristol | UK | 30 | 30 Aug 2023 | |
| 14 | Talbot Town Council | Ava Davies | LS1 1UR | Leeds | UK | ava.davies@example.com | 14 | 8 Jul 2022 |
| 15 | Sunshine Nursery | Grace Evans | BS1 4DJ | Bristol | UK | grace.evans@example.com | 30 | 8 Jul 2022 |
| 16 | Wolf Brewing Co | Liam Evans | M1 1AE | Manchester | UK | liam.evans@example.com | 30 | 1 Sep 2022 |
| 17 | Newman Opticians | Ava Evans | 02108 | Boston | USA | ava.evans@example.com | 14 | 10 May 2021 |
| 18 | Cook Dental Practice | Mia Taylor | 80202 | Denver | USA | mia.taylor@example.com | 14 | 1 Jun 2020 |
| 19 | Richter Realty | Lucas Walker | 02108 | Boston | USA | lucas.walker@example.com | 30 | 5 Mar 2024 |
| 20 | Bloom Garden Centre | Liam Clark | EC1A 1BB | London | UK | liam.clark@example.com | 14 | 10 Feb 2019 |
| 21 | Vogt Joinery | Emma Evans | LS1 1UR | Leeds | UK | 30 | 30 Jun 2024 | |
| 22 | Baker Dance School | Ava Evans | LS1 1UR | Leeds | UK | ava.evans@example.com | 30 | 24 Jun 2021 |
| 23 | Cathedral Pharmacy | Noah Walker | BS1 4DJ | Bristol | UK | noah.walker@example.com | 30 | 25 Mar 2023 |
| 24 | Meyer Physio | Lucas Taylor | LS1 1UR | Leeds | UK | lucas.taylor@example.com | 14 | 10 May 2022 |
Invoices 90 rows, 7 columns
| InvoiceID | InvoiceNo | CustomerID | InvoiceDate | DueDate | PaidOn | ReminderLevel |
|---|---|---|---|---|---|---|
| 1 | 2025-0001 | 9 | 17 Jan 2025 | 16 Feb 2025 | 8 Mar 2025 | 1 |
| 2 | 2025-0002 | 7 | 4 Feb 2025 | 18 Feb 2025 | 11 Mar 2025 | 1 |
| 3 | 2025-0003 | 2 | 12 Feb 2025 | 14 Mar 2025 | 4 Apr 2025 | 1 |
| 4 | 2025-0004 | 12 | 15 Feb 2025 | 17 Mar 2025 | 19 Feb 2025 | 0 |
| 5 | 2025-0005 | 9 | 15 Feb 2025 | 17 Mar 2025 | 10 Apr 2025 | 1 |
| 6 | 2025-0006 | 4 | 22 Feb 2025 | 24 Mar 2025 | 2 | |
| 7 | 2025-0007 | 15 | 4 Mar 2025 | 3 Apr 2025 | 23 Apr 2025 | 1 |
| 8 | 2025-0008 | 5 | 14 Mar 2025 | 13 Apr 2025 | 24 Apr 2025 | 0 |
| 9 | 2025-0009 | 4 | 5 Apr 2025 | 5 May 2025 | 17 Apr 2025 | 0 |
| 10 | 2025-0010 | 2 | 13 Apr 2025 | 13 May 2025 | 6 May 2025 | 0 |
| 11 | 2025-0011 | 23 | 17 Apr 2025 | 17 May 2025 | 26 May 2025 | 0 |
| 12 | 2025-0012 | 18 | 20 Apr 2025 | 4 May 2025 | 15 May 2025 | 0 |
| 13 | 2025-0013 | 16 | 25 Apr 2025 | 25 May 2025 | 27 May 2025 | 0 |
| 14 | 2025-0014 | 21 | 9 May 2025 | 8 Jun 2025 | 9 Jun 2025 | 0 |
| 15 | 2025-0015 | 4 | 14 May 2025 | 13 Jun 2025 | 19 May 2025 | 0 |
| 16 | 2025-0016 | 16 | 19 May 2025 | 18 Jun 2025 | 20 Jun 2025 | 0 |
| 17 | 2025-0017 | 16 | 17 Jun 2025 | 17 Jul 2025 | 1 Jul 2025 | 0 |
| 18 | 2025-0018 | 24 | 21 Jun 2025 | 5 Jul 2025 | 1 Jul 2025 | 0 |
| 19 | 2025-0019 | 10 | 23 Jun 2025 | 23 Jul 2025 | 10 Aug 2025 | 1 |
| 20 | 2025-0020 | 18 | 23 Jun 2025 | 7 Jul 2025 | 7 Jul 2025 | 0 |
| 21 | 2025-0021 | 2 | 2 Jul 2025 | 1 Aug 2025 | 2 | |
| 22 | 2025-0022 | 17 | 5 Jul 2025 | 19 Jul 2025 | 25 Jul 2025 | 0 |
| 23 | 2025-0023 | 17 | 11 Jul 2025 | 25 Jul 2025 | 31 Jul 2025 | 0 |
| 24 | 2025-0024 | 10 | 12 Jul 2025 | 11 Aug 2025 | 19 Aug 2025 | 0 |
| 25 | 2025-0025 | 10 | 12 Jul 2025 | 11 Aug 2025 | 1 Sep 2025 | 1 |
| 26 | 2025-0026 | 5 | 11 Aug 2025 | 10 Sep 2025 | 1 Sep 2025 | 0 |
| 27 | 2025-0027 | 17 | 20 Aug 2025 | 3 Sep 2025 | 27 Aug 2025 | 0 |
| 28 | 2025-0028 | 13 | 28 Aug 2025 | 27 Sep 2025 | 31 Aug 2025 | 0 |
| 29 | 2025-0029 | 7 | 31 Aug 2025 | 14 Sep 2025 | 8 Oct 2025 | 1 |
| 30 | 2025-0030 | 13 | 8 Sep 2025 | 8 Oct 2025 | 14 Sep 2025 | 0 |
| 31 | 2025-0031 | 3 | 15 Sep 2025 | 15 Oct 2025 | 24 Oct 2025 | 0 |
| 32 | 2025-0032 | 18 | 4 Oct 2025 | 18 Oct 2025 | 29 Oct 2025 | 0 |
| 33 | 2025-0033 | 23 | 5 Oct 2025 | 4 Nov 2025 | 2 Nov 2025 | 0 |
| 34 | 2025-0034 | 10 | 9 Oct 2025 | 8 Nov 2025 | 25 Oct 2025 | 0 |
| 35 | 2025-0035 | 12 | 17 Oct 2025 | 16 Nov 2025 | 3 Nov 2025 | 0 |
| 36 | 2025-0036 | 20 | 29 Oct 2025 | 12 Nov 2025 | 6 Nov 2025 | 0 |
| 37 | 2025-0037 | 5 | 5 Nov 2025 | 5 Dec 2025 | 25 Nov 2025 | 0 |
| 38 | 2025-0038 | 16 | 12 Nov 2025 | 12 Dec 2025 | 5 Dec 2025 | 0 |
| 39 | 2025-0039 | 21 | 12 Nov 2025 | 12 Dec 2025 | 25 Dec 2025 | 0 |
| 40 | 2025-0040 | 12 | 13 Nov 2025 | 13 Dec 2025 | 22 Dec 2025 | 0 |
| 41 | 2025-0041 | 2 | 14 Nov 2025 | 14 Dec 2025 | 7 Jan 2026 | 1 |
| 42 | 2025-0042 | 19 | 23 Nov 2025 | 23 Dec 2025 | 26 Dec 2025 | 0 |
| 43 | 2025-0043 | 24 | 27 Nov 2025 | 11 Dec 2025 | 5 Dec 2025 | 0 |
| 44 | 2025-0044 | 16 | 29 Nov 2025 | 29 Dec 2025 | 7 Dec 2025 | 0 |
| 45 | 2025-0045 | 15 | 2 Dec 2025 | 1 Jan 2026 | 22 Dec 2025 | 0 |
| 46 | 2025-0046 | 15 | 8 Dec 2025 | 7 Jan 2026 | 7 Jan 2026 | 0 |
| 47 | 2025-0047 | 13 | 17 Dec 2025 | 16 Jan 2026 | 30 Dec 2025 | 0 |
| 48 | 2025-0048 | 17 | 19 Dec 2025 | 2 Jan 2026 | 13 Jan 2026 | 0 |
| 49 | 2025-0049 | 16 | 25 Dec 2025 | 24 Jan 2026 | 16 Feb 2026 | 1 |
| 50 | 2025-0050 | 24 | 26 Dec 2025 | 9 Jan 2026 | 2 Jan 2026 | 0 |
| 51 | 2026-0001 | 3 | 8 Jan 2026 | 7 Feb 2026 | 2 Mar 2026 | 1 |
| 52 | 2026-0002 | 2 | 10 Jan 2026 | 9 Feb 2026 | 22 Feb 2026 | 0 |
| 53 | 2026-0003 | 14 | 20 Jan 2026 | 3 Feb 2026 | 2 Feb 2026 | 0 |
| 54 | 2026-0004 | 14 | 21 Jan 2026 | 4 Feb 2026 | 31 Jan 2026 | 0 |
| 55 | 2026-0005 | 18 | 23 Jan 2026 | 6 Feb 2026 | 23 Feb 2026 | 1 |
| 56 | 2026-0006 | 9 | 25 Jan 2026 | 24 Feb 2026 | 28 Feb 2026 | 0 |
| 57 | 2026-0007 | 13 | 31 Jan 2026 | 2 Mar 2026 | 21 Feb 2026 | 0 |
| 58 | 2026-0008 | 22 | 14 Feb 2026 | 16 Mar 2026 | 23 Mar 2026 | 0 |
| 59 | 2026-0009 | 21 | 14 Feb 2026 | 16 Mar 2026 | 29 Mar 2026 | 0 |
| 60 | 2026-0010 | 17 | 22 Feb 2026 | 8 Mar 2026 | 31 Mar 2026 | 1 |
| 61 | 2026-0011 | 24 | 1 Mar 2026 | 15 Mar 2026 | 22 Mar 2026 | 0 |
| 62 | 2026-0012 | 4 | 6 Mar 2026 | 5 Apr 2026 | 8 Mar 2026 | 0 |
| 63 | 2026-0013 | 4 | 20 Mar 2026 | 19 Apr 2026 | 31 Mar 2026 | 0 |
| 64 | 2026-0014 | 17 | 24 Mar 2026 | 7 Apr 2026 | 27 Apr 2026 | 1 |
| 65 | 2026-0015 | 9 | 2 Apr 2026 | 2 May 2026 | 11 Apr 2026 | 0 |
| 66 | 2026-0016 | 13 | 6 Apr 2026 | 6 May 2026 | 31 May 2026 | 1 |
| 67 | 2026-0017 | 2 | 27 Apr 2026 | 27 May 2026 | 13 May 2026 | 0 |
| 68 | 2026-0018 | 14 | 12 May 2026 | 26 May 2026 | 31 May 2026 | 0 |
| 69 | 2026-0019 | 12 | 23 May 2026 | 22 Jun 2026 | 10 Jun 2026 | 0 |
| 70 | 2026-0020 | 8 | 2 Jun 2026 | 2 Jul 2026 | 20 Jun 2026 | 0 |
| 71 | 2026-0021 | 4 | 5 Jun 2026 | 5 Jul 2026 | 12 Jul 2026 | 0 |
| 72 | 2026-0022 | 10 | 16 Jun 2026 | 16 Jul 2026 | 30 Jun 2026 | 0 |
| 73 | 2026-0023 | 18 | 16 Jun 2026 | 30 Jun 2026 | 27 Jun 2026 | 0 |
| 74 | 2026-0024 | 24 | 17 Jun 2026 | 1 Jul 2026 | 17 Jul 2026 | 1 |
| 75 | 2026-0025 | 20 | 20 Jun 2026 | 4 Jul 2026 | 12 Jul 2026 | 0 |
| 76 | 2026-0026 | 7 | 19 Jul 2026 | 2 Aug 2026 | 2 | |
| 77 | 2026-0027 | 20 | 8 Aug 2026 | 22 Aug 2026 | 10 Aug 2026 | 0 |
| 78 | 2026-0028 | 13 | 24 Aug 2026 | 23 Sep 2026 | 30 Sep 2026 | 0 |
| 79 | 2026-0029 | 24 | 25 Aug 2026 | 8 Sep 2026 | 21 Sep 2026 | 0 |
| 80 | 2026-0030 | 4 | 30 Aug 2026 | 29 Sep 2026 | 2 Oct 2026 | 0 |
| 81 | 2026-0031 | 2 | 1 Sep 2026 | 1 Oct 2026 | 22 Sep 2026 | 0 |
| 82 | 2026-0032 | 21 | 15 Sep 2026 | 15 Oct 2026 | 2 | |
| 83 | 2026-0033 | 16 | 15 Sep 2026 | 15 Oct 2026 | 14 Oct 2026 | 0 |
| 84 | 2026-0034 | 8 | 27 Sep 2026 | 27 Oct 2026 | 1 | |
| 85 | 2026-0035 | 12 | 28 Sep 2026 | 28 Oct 2026 | 1 | |
| 86 | 2026-0036 | 5 | 6 Nov 2026 | 6 Dec 2026 | 0 | |
| 87 | 2026-0037 | 13 | 7 Nov 2026 | 7 Dec 2026 | 19 Nov 2026 | 0 |
| 88 | 2026-0038 | 24 | 11 Nov 2026 | 25 Nov 2026 | 0 | |
| 89 | 2026-0039 | 9 | 17 Nov 2026 | 17 Dec 2026 | 0 | |
| 90 | 2026-0040 | 14 | 21 Nov 2026 | 5 Dec 2026 | 0 |
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
The lesson on subforms shows how subforms are linked, the lesson on DLookup and DSum covers DCount.
Common mistakes
Invoice number in SQL view
In Design view Access adds the quotes itself for a text field: 2026-0035 under InvoiceNo becomes "2026-0035". In SQL view, however, 2026-0035 without quotes is a sum, 2026 minus 35. Access then compares the number 1991 with every invoice number, finds none and shows an empty result, with no error message. So put text in quotes straight away; then it works in both views.
Missing brackets
[Quantity]*[UnitPrice]*1+[TaxRate] adds 0.2 to the net amount because multiplication comes first. The brackets around 1+[TaxRate] turn it into the factor 1.2.
In real Access
- A real invoice form combines both: a main form on Invoices, a subform on lines, and a combo box for the service in the subform.
- When the service is picked, VBA copies the list price from Services into the line's unit price. That way old invoices keep their price even when the price list changes.
- Invoice amounts are usually rounded to the cent per line before summing; Round([Amount],2) does that.
How to check your result
- Task 1: three lines; the workshop with 3 days comes to 2,850.00 net and 3,420.00 gross, the training with 10.5 hours at the discounted 85.50 to 897.75 net.
- Task 2: the customer card shows 24 customers. A customer who has paid every invoice shows 0 under Unpaid.
Back to the course overview.