Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill Reed - 12 May 2005 18:47 GMT
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
Marshall Barton - 12 May 2005 20:30 GMT
>Here's the query:
>
[quoted text clipped - 5 lines]
>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])

Signature

Marsh
MVP [MS Access]

Bill Reed - 16 May 2005 14:59 GMT
Thank you Marshall! All donations are gratefully accepted.

Bill
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.