I am creating a report that I want to design as a timetable to show which courses are offered in a particular classroom each day of the week. I want to have a number of textboxes in the report that represent the different time slots in the week. For the control source for these textboxes, I will use dlookup that pulls the course names from my courses query like this:
=DLookUp("Course_number","Qry_Courses","timeslot = 'MW 8:30 - 10:20' And room= '0AN70' and term= 'FC'")
So far this has been working, but I would like to add an "or" to the timeslot option because some courses have a timeslot of 'MW 8:30 - 10:20' (meaning both Monday and Wednesday) and some are M 8:30 - 10:20' (Monday only).
So for my Monday 8:30 – 10:20 textbox, I need it to search for a course that matches either timeslot 'M 8:30 - 10:20' or timeslot 'MW 8:30 - 10:20'. When I try to add the "or" into the formula, it doesn’t seem to be working. I’ve tried it both of these ways:
=DLookUp("Course_number","Qry_Courses","timeslot = 'W 8:30 - 10:20' or ‘MW 8:30 – 10:20’ And room= '0AN70' and term= 'FC'")
=DLookUp("Course_number","Qry_Courses","timeslot = 'W 8:30 - 10:20' or timeslot= ‘MW 8:30 – 10:20’ And room= '0AN70' and term= 'FC'")
=DLookUp("Course_number","Qry_Courses","timeslot = 'MW 8:30 - 10:20' And room= '0AN70' and term= 'FC'")
So far this has been working, but I would like to add an "or" to the timeslot option because some courses have a timeslot of 'MW 8:30 - 10:20' (meaning both Monday and Wednesday) and some are M 8:30 - 10:20' (Monday only).
So for my Monday 8:30 – 10:20 textbox, I need it to search for a course that matches either timeslot 'M 8:30 - 10:20' or timeslot 'MW 8:30 - 10:20'. When I try to add the "or" into the formula, it doesn’t seem to be working. I’ve tried it both of these ways:
=DLookUp("Course_number","Qry_Courses","timeslot = 'W 8:30 - 10:20' or ‘MW 8:30 – 10:20’ And room= '0AN70' and term= 'FC'")
=DLookUp("Course_number","Qry_Courses","timeslot = 'W 8:30 - 10:20' or timeslot= ‘MW 8:30 – 10:20’ And room= '0AN70' and term= 'FC'")