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

Query for Inactive Records 2

Status
Not open for further replies.

mkallover

Programmer
Feb 6, 2008
88
US
I want to write a query that will display project records in a table that have not been updated for X amount of days.

I have two tables: tblProjects, tblUpdates

The tables are related on 'CPOProjectNum' with a one to many relationship. What I would like is a query that would display an project that does not have an associated update with the past X days.

Any ideas on where to get started here?
 
Simply follow the unmatched query wizard.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Typed not tested:
Code:
SELECT * FROM TblProjects P
INNER JOIN tblUpdates U ON P.CPOProjectNum = U.CPOProjectNum
WHERE SomeDateField < DateAdd('d', -3, Now())

This should find all records where SomeDateField is more than three days ago.

Leslie

Have you met Hardy Heron?
 
Thanks guys. I sort of combined your two ideas and achieved what I wanted.

Thanks a lot for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top