iif statement

J

JOM

I have the following statement
=IIf([TaxDocStatus]<>"Pending",Max([TxDocDateRcvd]),"")

the thing is that when I use this in a report, it give the max date of all
the records but what am really interested in is that it should be for each
borrower [BorrowerID] as they would be different.... Any idea how I can do
that
 
J

John Vinson

I have the following statement
=IIf([TaxDocStatus]<>"Pending",Max([TxDocDateRcvd]),"")

the thing is that when I use this in a report, it give the max date of all
the records but what am really interested in is that it should be for each
borrower [BorrowerID] as they would be different.... Any idea how I can do
that

You'll need to use the DMax() function: Instead of
Max([txtDocDateRecvg]) use

DMax("[TxDocDateRcvd]", "[YourTableName]", "[BorrowerID] = " &
[BorrowerID])

assuming that the table fieldname is in fact txDocDateRcvd and using
your own table name.

John W. Vinson[MVP]
 

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