Sum on Previous Records

L

Lloyd

I am trying to create an unbound field on a single-ecord payment form which
gives the value of payments [PaSalDLCDPor] previously made on a grant.
tblGrantSum is the parent table and tblPayments is the child table. I used
the query builder to create the following query and included it as the
control source for the textbox, but it gives me a #Name? error and it does
not address the issue of excluding the current tblPayment record.
[DLCDGrant#] is the key field and is a string.

Can someone help me?

Lloyd

SELECT Sum(tblPayments.PaySalDLCDPor) AS SumOfPaySalDLCDPor
FROM tblGrantSum INNER JOIN tblPayments ON tblGrantSum.[DLCDGrant#] =
tblPayments.[DLCDGrant#];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top