View Single Post
 
Old 07-13-2014, 04:24 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try the attached. I changed the 'Due' formula in Excel and added 'Overdue' (over 1 month) and 'Expired' (less than 1 month) sets to the report. Getting the dates to output in the same format as your workbook was the tricky part.

The three DATABSE fields are:
Overdue
{ DATABASE \d "{FILENAME \p}/../Tracker.xlsx" \s "SELECT [Last], [First], [Rank], [Dept], FORMAT([AA&E], 'DD-MMM-YYYY') AS Expiry FROM [Tracker$] WHERE [Due] < 0 ORDER BY [Last] " \l "9" \b "47" \h }

Expired
{ DATABASE \d "{FILENAME \p}/../Tracker.xlsx" \s "SELECT [Last], [First], [Rank], [Dept], FORMAT([AA&E], 'DD-MMM-YYYY') AS Expiry FROM [Tracker$] WHERE [Due] = 0 ORDER BY [Last] " \l "9" \b "47" \h }

Due Within 1 Month
{ DATABASE \d "{FILENAME \p}/../Tracker.xlsx" \s "SELECT [Last], [First], [Rank], [Dept] , FORMAT([AA&E], 'DD-MMM-YYYY') AS Expiry FROM [Tracker$] WHERE [Due] = 1 ORDER BY [Last]" \l "9" \b "47" \h }
Attached Files
File Type: zip CertificationExpiry.zip (29.0 KB, 117 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote