date range SQL

Mr.K

Registered User.
Local time
Today, 12:42
Joined
Jan 18, 2006
Messages
104
I have two tables: tblClasses & tblSchedule. There are joined by ClassID. For each class in the tblClasses there are several records with date field in the tblSchedule. (So each class stored in tblClasses happens on multiple dates stored in tblSchedule).

I want to create a query (SQL view) that would take two date inputs from a form(date range): datefrom & dateto, and return any class of which FIRST day of classes falls in between those dates.

(Or: how can I add a field to my query called [First day of class] that would basically have the value of the first date from the tblSchedule for the joined classID?)
 
Hello Mr.K!

In query Criteria for date field put:
Between [DateFrom] And [DateTo]
 
Mr.K said:
(Or: how can I add a field to my query called [First day of class] that would basically have the value of the first date from the tblSchedule for the joined classID?)

Could someone answer the above? Mstef, thanks for the tip but I knew about the BETWEEN; this doesn't solve my question but I'm having a hard time to explain why. Maybe some tips on the quote above would help me to ask the question again in a better way.
 

Users who are viewing this thread

Back
Top Bottom