How to add # of days to a parameter that returns a date?

  • Thread starter Thread starter Bill Reed via AccessMonster.com
  • Start date Start date
B

Bill Reed via AccessMonster.com

Here's the query:

SELECT CalendarDay
FROM tblCalendar
WHERE CalendarDay>=[Enter Date] AND CalendarDay<[Enter Date]+7 AND Weekday=1

I'm trying to get the next Sunday after the date entered into the
parameter, "[Enter Date]", without requiring the user to input 2 dates. Can
anyone help me with a workable way to implement the above logic?

Thanks,

Bill
 
Bill said:
Here's the query:

SELECT CalendarDay
FROM tblCalendar
WHERE CalendarDay>=[Enter Date] AND CalendarDay<[Enter Date]+7 AND Weekday=1

I'm trying to get the next Sunday after the date entered into the
parameter, "[Enter Date]", without requiring the user to input 2 dates. Can
anyone help me with a workable way to implement the above logic?


That should be something like this (air code)

AND CalendarDay < DateAdd("d",7 - WeekDay([Enter Date], 2),
[Enter Date])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top