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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Overdue Dates 1

Status
Not open for further replies.

jchollo

MIS
Sep 15, 2005
22
US
I had asked this question previously and was told to use the DateDiff() function.

I have an action database with a field Due Dates. I named another field Overdue which is currently blank with I want to use for the query results.

I want to figure out once a due date is past, have the results display in the Overdue field - 1 day past due, 2 days past due, etc. in red.

How would you write the function? I am not a Access person. Also, how could I display the query results in red?

tks
 
Don't store derived/calculated values in a table, especially values changing every day !
So, remove the Overdue field from your table.
In the query grid:
Overdue: IIf([Due Date]<Date(), Int(Date()-[Due Date]) & ' days past due', '')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
When I entered the mentioned query - I received the error - You may have entered an invalid identifier or typed parentheses following the null constant criteria.

I do type this string for the criteria in the query design. pls verify.

tks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top