472,142 Members | 1,210 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

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, 146 views)
Aug 6 '09 #1
0 2513

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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.