hi,
have the following tables
book
bookid slotid date carid
1 1 2006/06/02 1
1 2 2006/06/02... 3
mottimes
id mott slotid
1 9:00 1
2 10:00 2
3 11:00 3
am making a query that lists All mot times in a table
and puts the car that is having an mot in the correct slot.
so far...
now if i take out 'AND book.bookdate =" & [motdate] '
it works fine.
the thing is even if there are no cars booked for [motdate]
i still want it to list all times in mottimes thats why i used left joins.
at the moment i get an eof error.
have the following tables
book
bookid slotid date carid
1 1 2006/06/02 1
1 2 2006/06/02... 3
mottimes
id mott slotid
1 9:00 1
2 10:00 2
3 11:00 3
am making a query that lists All mot times in a table
and puts the car that is having an mot in the correct slot.
so far...
Code:
motsql1 = "SELECT mot.mott, mot.motslot, car.reg, book.bookdate "_
& "FROM mottimes AS mot "_
& "LEFT JOIN book ON mot.motslot = book.slotid "_
& "LEFT JOIN car ON book.carid = car.carid "_
& "WHERE dayid =1 AND bayid =1 AND book.bookdate =" & [motdate]
now if i take out 'AND book.bookdate =" & [motdate] '
it works fine.
the thing is even if there are no cars booked for [motdate]
i still want it to list all times in mottimes thats why i used left joins.
at the moment i get an eof error.