Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Days Past Due Report

Status
Not open for further replies.

meierswa

Technical User
Nov 21, 2002
20
HK
I am trying to create a report that will list all documents that have been received but have not been processed with 15 days.

Right now I have 2 dates (dtReceived and dtCompleted, Is Null) in the SQL statement in the report.

I also have a form with a text box (txtDate). The date input on the form should be compared to the dtReceived to see if 15 days have passed and the document has not been completed. I tried this:

DateDiff("d","dtReceived",[Forms]![frm15days]![txtDate])>15

Am I even close?
 
If I'm understanding you correctly, I think you need to change "dtReceived" to Me!dtReceived (without any quotes). I'm not positive, but I think this should get you working.
 
In your SQL statement, try the following as criteria for dtReceived:

< DateAdd(&quot;d&quot;,-15,[Forms]![frm15days]![txtDate])

DateAdd takes 15 days off of the value you've entered into the form. If dtReceived is still less than that value, then over 15 days have passed.
 
This is what I ended up with:

Expr 1: DateDiff(&quot;d&quot;,[tblActivity]![dtReceived],[Forms]![frm15days]![txtDate])

with >15 in the criteria.

It seems to be working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top