Hi
Could anyone offer some help please?
I have a form FrmReservations. On this form is a listbox AvailListBox running an sql query which finds data from 2 tables TblVehicles and TblReservations based on a date range which is in a subform FrmReservationDates.
The sql for the listbox is:
SELECT Reg, Colour, Model FROM TblVehicles WHERE Reg Not In (SELECT Reg FROM TblReservations WHERE ResStartDate Between [FrmReservationDates].Form![StartDate] And [FrmReservationDates].Form![EndDate] OR ResEndDate Between [FrmReservationDates].Form![StartDate] And [FrmReservationDates].Form![EndDate]);
This all works perfectly thanks to PHV!
On the form I have all the fields from TblVehicles and I want these to populate once I select an item from the listbox AvailListBox. However, I can't work out how to get this data to populate.
Any help is appreciated.
Thanks
Could anyone offer some help please?
I have a form FrmReservations. On this form is a listbox AvailListBox running an sql query which finds data from 2 tables TblVehicles and TblReservations based on a date range which is in a subform FrmReservationDates.
The sql for the listbox is:
SELECT Reg, Colour, Model FROM TblVehicles WHERE Reg Not In (SELECT Reg FROM TblReservations WHERE ResStartDate Between [FrmReservationDates].Form![StartDate] And [FrmReservationDates].Form![EndDate] OR ResEndDate Between [FrmReservationDates].Form![StartDate] And [FrmReservationDates].Form![EndDate]);
This all works perfectly thanks to PHV!
On the form I have all the fields from TblVehicles and I want these to populate once I select an item from the listbox AvailListBox. However, I can't work out how to get this data to populate.
Any help is appreciated.
Thanks