HI All
Acc2003
I have a report populated by a query of an Invoices table. This query lists all invoices for a given customer. The customer's ID is passed to the query via a pop-up customer-selection form. The selection form calls the query and then the report when "OK" button is clicked.
The report's page header has a textbox containing the customer_ID
The detail section shows the
1. "invoice_number",
2. "Invoice_Value" (currency)
3. "Date_Issued"
4. "Date_Payment_Recd" (can be NULL).
The report footer has a DSUM totals box for all the invoices shown.
All easy stuff so far...
I want a 2nd textbox on the report footer which Dsums all the invoices that HAVE been paid... i.e. where the "date_payment_recd" is NOT Null.
You can probably guess the next bit... a 3rd textbox with the amount oustanding (i.e. total amount invoiced minus total amount rec'd)
Here's my latest attempt at Dsumming the 2nd textbox
=NZ(DSum("Invoice_Value", "Invoices", "[Customer_No] = " & ![Customer_No_TextBox] & "[Date_Payment_Recd]=NULL"))
All I get is #ERROR..... I know Report textboxes work slightly differently to Form textboxes but can anyone see the problem?
Cheers
Acc2003
I have a report populated by a query of an Invoices table. This query lists all invoices for a given customer. The customer's ID is passed to the query via a pop-up customer-selection form. The selection form calls the query and then the report when "OK" button is clicked.
The report's page header has a textbox containing the customer_ID
The detail section shows the
1. "invoice_number",
2. "Invoice_Value" (currency)
3. "Date_Issued"
4. "Date_Payment_Recd" (can be NULL).
The report footer has a DSUM totals box for all the invoices shown.
All easy stuff so far...
I want a 2nd textbox on the report footer which Dsums all the invoices that HAVE been paid... i.e. where the "date_payment_recd" is NOT Null.
You can probably guess the next bit... a 3rd textbox with the amount oustanding (i.e. total amount invoiced minus total amount rec'd)
Here's my latest attempt at Dsumming the 2nd textbox
=NZ(DSum("Invoice_Value", "Invoices", "[Customer_No] = " & ![Customer_No_TextBox] & "[Date_Payment_Recd]=NULL"))
All I get is #ERROR..... I know Report textboxes work slightly differently to Form textboxes but can anyone see the problem?
Cheers