DateDiff in a query

augie0216

New member
Local time
Today, 15:28
Joined
Jun 19, 2006
Messages
7
Have a table which has 4 fields PatientID FirstName,LastName,BalanceDue,Due Date
Trying to create a query that will show all fields of the accounts that have due dates that are under 30 days. I tried this Under30: DateDiff("d",[DueDate].Now())criteria >0 And <30. But can't put anything in the parameter dialog box which after clicking ok shows any data. If I can get this to work my hope is to have 3 more catagories. over 30 days, over 60 days and over 90 days. I'm new at access and could really use some help.
 
simply put as a criteria: <Date() +30 and > date()
 
If you are going to want to display a 30, 60 and 90 day aging in separate columns, you will need to do individual queries for each and then bring them all together.
 
If this is like an Accounts Recievable aging, you can do it in one query.

Under30: IIf(DateDiff(...) < 30, AmountDue, 0)
30To60: same thing but the comparison tests for that range
60To90: by now you get the picture
 

Users who are viewing this thread

Back
Top Bottom