Hi guys,
Need help urgently as part of my university assignment. I have a database which is serving to act in place for a holiday park containing caravans. The problem is that within the search criteria I have to find times when caravans are free and bring up a list of available caravans. So you can only book a caravan if the start and end date are both before other times when it is booked or both after. I have this code:
SELECT TblCaravan.[Caravan No]
FROM TblCaravan INNER JOIN TblCaravanBooking ON TblCaravan.[Caravan No] = TblCaravanBooking.[Caravan No]
WHERE (((#[Forms]![Booking]![When Required]#)<[TblCaravanBooking].[When Required]))
ORDER BY TblCaravan.[Caravan No];
I cannot for the life of me work out how to make this work but as you can see the input data is being called from a field within a form.
Please help. I'm desperate!
Regards,
Schillers
Need help urgently as part of my university assignment. I have a database which is serving to act in place for a holiday park containing caravans. The problem is that within the search criteria I have to find times when caravans are free and bring up a list of available caravans. So you can only book a caravan if the start and end date are both before other times when it is booked or both after. I have this code:
SELECT TblCaravan.[Caravan No]
FROM TblCaravan INNER JOIN TblCaravanBooking ON TblCaravan.[Caravan No] = TblCaravanBooking.[Caravan No]
WHERE (((#[Forms]![Booking]![When Required]#)<[TblCaravanBooking].[When Required]))
ORDER BY TblCaravan.[Caravan No];
I cannot for the life of me work out how to make this work but as you can see the input data is being called from a field within a form.
Please help. I'm desperate!
Regards,
Schillers