Hi guys, found the answers I was looking for on the forum many times, but now time for a first post.
I have a database for a watersports company. One query works out which courses are running today for a display it outputs. It works fine for the start date alone but runs very slowly when I use the number of days added to the start date to find out if we are still running a course (as in this is day three of a four day course.)
This does work very well - but very slowly as I guess it must be running a dateadd calculation on every line. Any suggestions for making this more efficient?SELECT [Courses Running].[Course Reference], [Courses Running].[Start Date], [Course Listing].[Duration (Days)], CDate(DateAdd("d",[Duration (Days)]-1,[Start Date])) AS FinishDate, [Course Listing].Course
WHERE ((([Courses Running].[Start Date])<=Date()) AND ((CDate(DateAdd("d",[Duration (Days)]-1,[Start Date])))>=Date()))