Experts, how can I modify the below False part (the Dsum) to only sum if tblPayments.[PaymentDate] is not null (meaning the field has a date in it). The below is in the query design window. II am not sure if it matters but tblPayments is not a table in the query.
thank you
SumPayments: IIf([PaidInFullYN]=True,"Paid In Full",DSum("Amount","tblPayments","[LCID] = " & [LetterOfCreditID]))
do you know why it works in the query design window but when I drag the field onto the report it gives me an error after running rpt of the following. tblPayments is not in the record source if that matters. I do not get the error if I remove the: And [PaymentDate] Is Not Null"
But why not leave it in the query? In most case the query is better to do the hard work than the report. Also, remove any sorting in the source query if present. Move that to the report.
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
Jim.