Need Querry to show records that are 3 months old

raydan

Registered User.
Local time
Today, 11:16
Joined
Aug 24, 2005
Messages
28
I have a querry designed to show loans that have a start date and an end date. I want my querry to show loans that have a start date, no end date, and that are 3 months old. Here is what I have so far but I can't figure out how to increment the 3 months on the start date:

SELECT Detail.CustomerID, Detail.TransactionID, Loan.LoanAmount, Loan.StartDate, Loan.EndDate, Loan.LoanLender
FROM Detail INNER JOIN Loan ON Detail.CustomerID = Loan.TransactionID
WHERE (((Loan.EndDate) Is Null))
WHERE ((( Loan.StartDate)) Is


Please help finish this line.

raydan
 
Code:
SELECT Detail.CustomerID, Detail.TransactionID, Loan.LoanAmount, _
Loan.StartDate, Loan.EndDate, Loan.LoanLender _
FROM Detail INNER JOIN Loan ON Detail.CustomerID = Loan.TransactionID _
[B]WHERE ((Loan.EndDate Is Null) _
AND (Loan.StartDate <  DateAdd("m", -3, Date))[/B]
 
Thank you that worked! Is it possible though to have it ckeck records from the current date to see if any records are 3 months old. With it this way I have to enter the date manually for Acess to see if anything is 3 months older than the date I entered. I would like the DB to look at the StartDate field as the date it begins the 3 month count, and if there is no EndDate and the record is 3 months old it will show that record.

Thanks for the help, I was very stuck.
 
I thought it would work that way, sorry. Changing Date to Date() should fix it.
 
Your the man!!! That worked, thanks so much.
 

Users who are viewing this thread

Back
Top Bottom