Send email based on access query.
I have an access query like below. I want to send email to 2-3 email address with related record from the query.
In short if the paymentsent is null for more 24 hours an email should be sent to manager. if paymentsent is null for 48 hours an email should go to manager and AGM. But this timing should not count holidays
Sno orderno orderdate dateentered paymentsent
1 123 12-9-2014 15-9-2014 15-9-2014
2 124 16-9-2014 18-9-2014 19-9-2014
3 125 17-9-2014 19-9-2014 21-9-2014
I managed to get the difference between the date enetered and today if it is more thah 12 hours an email should go to manager. may be you have better idea.
SELECT TB.orderEntryDate, Now()-[orderEntryDate] AS TEST, TB.Payment, TB.order_no
WHERE (((TB.PIEntryDate) Is Not Null) AND ((Now()-[orderEntryDate])>=1));