The invoice form with a subform for line items sounds right. If the subform
is in continuous view and shows the total at the bottom, that's perfect.
(The idea of displaying the total on the main form is a workaround for
people who want the subform in Datatsheet view.)
It looks like you have tied payments to invoices such that one invoice can
have many payments. You could therefore add a 2nd subform onto your Invoices
form, for the payments. The total payments received for the invoice would
then show in the Form Footer of this 2nd subform.
To show the balance remaining, add a text box to your main form, and set its
Control Source like this:
=[Sub1].Form![txtTotal] - Nz([Sub2].Form![txtTotal],0)
Replace "Sub1" with the name of your first subform (the invoice line items),
and "Sub2" with the name of your payments subform. In each case, replace
"txtTotal" with the name of the text box that contains the total in the
footer of the subform. The Nz() gives the value zero if there are no
payments yet, so it shows the full invoice amount as owing.
(The structure you have chosen does not cope with someone sending a payment
that covers 2 invoices, or a pre-payment for work that is not yet invoiced.
But you might be happy to just ignore those cases.)

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi all
>
[quoted text clipped - 59 lines]
> I racked my brain for a few days, but I now concede; I am officially
> stumped.
prodeji - 20 Jul 2006 20:45 GMT
Hey Allen
Your analysis of what I was trying to accomplish was pretty good, and
your suggestion right on the money.
I implemented it and it works perfecto.
Thanks a lot, man, I was about ready to pull my hair out!!
:)
> The invoice form with a subform for line items sounds right. If the subform
> is in continuous view and shows the total at the bottom, that's perfect.
[quoted text clipped - 88 lines]
> > I racked my brain for a few days, but I now concede; I am officially
> > stumped.