I don't know that I've ever seen a domain function used in a query like you posted, but it may be usefull somewhere...
Anyway, I think maybe I would put a text box on the form and set its control source using the domain function.
This would sum all records:
DSum("[inv_amt]";"invoices")
However, I think maybe you need to do all invoices for a customer (or something along those lines?)
This of course is all a qualified response to your issue as I don't think I get the entire picture...
???
kh