P
Paul James
I've got two related tables - tblInvoice and tblDetail which are related by
InvoiceID fields in each table. The Amount field is in tblDetail.
I've got a query containing fields from tblInvoice, and I'd like to add a
calculated field called "Total" to the query that will display the total of
the corresponding Amount fields in the related table.
I'm thinking the best way to do this is with the DLookup() function:
DLookup("[Amount]", "tblDetails", . . . . . .)
but I'm not sure what to put in the third argument of the function.
Two questions:
1. Am I right in thinking DLookup is the best way to do this, and
2. can anyone tell me what expression I can put in the third argument above
to obtain a Total of the Amount field in tblDetail?
Thanks in advance,
Paul
InvoiceID fields in each table. The Amount field is in tblDetail.
I've got a query containing fields from tblInvoice, and I'd like to add a
calculated field called "Total" to the query that will display the total of
the corresponding Amount fields in the related table.
I'm thinking the best way to do this is with the DLookup() function:
DLookup("[Amount]", "tblDetails", . . . . . .)
but I'm not sure what to put in the third argument of the function.
Two questions:
1. Am I right in thinking DLookup is the best way to do this, and
2. can anyone tell me what expression I can put in the third argument above
to obtain a Total of the Amount field in tblDetail?
Thanks in advance,
Paul