469,644 Members | 1,973 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

Help Please!!! Adding 5 Days to another Date in an access query

Help Please!!! Adding 5 Days to another Date in an access query

Good Morning,
Help please…. I am new to access and trying to write a query that will add 5 days between a RecDate and a DLPayDate
I created the query in design view of access.

Current Query: SELECT PaymentCalculator2.ID, PaymentCalculator2.RecDate, DateAdd("w",5+1,[RecDate]) AS DLPayDate, DateAdd("w",5,[RecDate]) AS DLPayDate2
FROM PaymentCalculator2
WHERE (((DateAdd("w",5+1,[RecDate]))=(DLookUp("[Holiday]","Holidays")))) OR ((("Else ")<>(DLookUp("[Holiday]","Holidays"))));
Problem: my current results are displaying in 3 columns and I don’t know how to fix it.

Needed Results:
2 columns 1st Column RecDate 2nd Column DLPayDate (= RecDate + 5 Days)
The DLPayDate should accommodate the following 3 scenarios:
1. RecDate + DLPaydate (RecDate +5 workdays – No Holidays)
2. RecDate + DLPayDate(RecDate + 6 days – add one additional day to inlcude Holiday)
3. RecDate + DLPayDate (RecDate + 5 days – skip Saturday and Sunday)
Additionally I created a lookup holiday table to reference and adjust when applicable.
Can someone please help me? I am in a bind and need this information for a meeting please.
Thanks,
“Z”
Attached Images
File Type: jpg DLPaidDateCalculatorQuery.jpg (13.8 KB, 138 views)
Aug 6 '09 #1
0 2384

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by No Spam Please | last post: by
1 post views Thread by Lee Holsenbeck | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.