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!

Generate report from multiple date queries

Status
Not open for further replies.

wbow

Technical User
Feb 8, 2005
50
GB
Have an Access 2003 database with three tables; tbMgr, tbEng and tbQuals.

EngID is the primary key field in the tbEng table which is imported into the tbQuals table on a one to many relationship, with tbMgr having a one to many relationship with tbEng.

Each EngID has up to 30 Quals each with its own expiry date.
I need to generate a report for each EngID showing only those Quals that have expired, or are within 30 days of exipry for e-mailing to their mgr.

Could anyone please explain how to do this?

Thank you
 
How about a simple join:
Code:
Select ...list of fields...
from tbMgr M inner join tbEng E on M.[managerID] = E.[managerID]
inner join tbQuals Q on Q.[EngID] = E.[EngId]

where Q.[expiryDate] <= dateadd("d", 30, Date())



Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top