Presumably you have 2 tables, such as:
- tblInvoice (the header record), with fields:
o InvoiceID primary key
o ClientID relates to tblClient.Client
o InvoiceDate Date/Time
- tblInvoiceDetail (the line items), with fields:
o InvoiceID relates to tblIvoice.InvoiceID
o ProductID relates to tblProduct.ProductID
o Quantity Number
o PriceEach Currency
etc.
To create a report that looks like an invoice:
1. Create a query that uses both tables, along with tblClient and
tblProduct.
2. Create a report based on this query. Output all the fields you will need
for the report from the 4 tables. Also add a column for any calculated
fields, e.g.:
Amount: [Quantity] * [PriceEach]
3. In report design view, open the Sorting And Grouping dialog (View menu.)
4. In the first row of the dialog, choose the InvoiceID field, and in the
lower pane of the dialog choose Yes for both Group Header and Group Footer.
Access adds 2 new sections to the report - the InvoiceID Group Header (above
the Detail), and the InvoiceID group Footer below.
5. Right-click the InvoiceID Group Header (the grey bar), and in the
Properties box (Format tab), set the Force New Page property to Before. This
ensures each invoice begins on a new page.
6. Increase the height of the InvoiceID Group Header to about 3 inches. In
this section, add the fields for the invoice number, invoice number, and the
address panel (customer name and address lines, placed where they will print
correctly for a window-faced envelope.)
7. In the Detail section, add the fields for the line items. Cut their
labels (Ctrl+X) and paste them into the InvoiceID Group Header. Place them
in a row across the bottom of the section (below the address panel.)
8. Line up the fields in the Detail section side-by-side across the report,
each one under its label. Access will print the InvoiceID header section
once at the top of the invoice, and will then print as many Detail rows are
needed for the invoice.
9. In the InvoiceID Group Footer (below the detail section), add a text box
to show the total. For example:
=Sum([Amount])