Answers in-line. (Question re-ordered.)
The first problem I'm having is as the SupplierInvoiceRef is a required
field
when I click on one of the check boxes this is causing Access to try and
save
the record in the Master form, is there any way of delaying this??
No. Access saves the record as soon as you leave it. You cannot leave the
main form record unsaved while you enter the subform or vice versa.
And next on the subform I have a LineTotal field is it possible to Sum
only
the fields the have the checked box ticked, then palce this total onto a
textbox on the main form to allow a further calculation/comparison with
fields TotalNettAmount and CarriageAmount ??
You can sum a field conditionally. For example, you could put this into the
Control Source of a text box in the subform's Form Footer section:
=Sum(IIf([MyYesNoField], [Amount],0)
You do *not* save the calculated field into the main form's table. You can
display the calculated total on the main form if you wish. For an example,
open the Northwind sample database that installs with Access, and open the
Orders form. The subform totals the order amounts, and the main form
displays the total, but does not store it in its table.
Firstly let me explain what I am trying to do....I have a master form that
is
[quoted text clipped - 11 lines]
a
certain order we may get an invoice for each delivery.
As in Northwind, one order can have many line items, so you have an Order
table and an OrderDetail table. Similarly, one delivery can have many items,
so you have Delivery and DeliveryDetail tables. If you ordered 100 widgets
and the supplier only has 10 in stock, they might send 10 and backorder 90
for you, so there is a one-to-many relation between OrderDetail and
DeliveryDetail. With this approach, an order is completely delivered once
the sum of quantity in DeliveryDetail matches the quantity in OrderDetail
for all the OrderDetail rows in the order.
You may find that supplier invoices are different again. For example, a
supplier might invoice you monthly, so each invoice covers multiple
deliveries. At least, it is worth considering those scenarios when you try
to build the data structure that will handle all reasonable possibilities.
HTH.