Hello,
I have the problem for the format date time. In the forms I set up "Forms!PickDates!TimeOut" is (1:00-12:00 am, or pm), but in the "qrySCHEDULE", I set up "RESERVE_TIME_IN" is (1:00-24:00). The question is I don't know how to format them and compare the time. Please help me out.
Thank you very much for your kind help.
Wdu
The following are my code:
(Forms!PickDates!End = DLookup("[RESERVE_DATE_IN]", "qrySCHEDULE", "[VEHICLE_ID]=" & Me![VEHICLE_ID]) And Forms!PickDates!Start = DLookup("[RESERVE_DATE_OUT]", "qrySCHEDULE", "[VEHICLE_ID]=" & Me![VEHICLE_ID]) And (Forms!PickDates!TimeOut) <= DLookup("([RESERVE_TIME_IN])", "qrySCHEDULE", "[VEHICLE_ID]=" & Me![VEHICLE_ID]))
I have the problem for the format date time. In the forms I set up "Forms!PickDates!TimeOut" is (1:00-12:00 am, or pm), but in the "qrySCHEDULE", I set up "RESERVE_TIME_IN" is (1:00-24:00). The question is I don't know how to format them and compare the time. Please help me out.
Thank you very much for your kind help.
Wdu
The following are my code:
(Forms!PickDates!End = DLookup("[RESERVE_DATE_IN]", "qrySCHEDULE", "[VEHICLE_ID]=" & Me![VEHICLE_ID]) And Forms!PickDates!Start = DLookup("[RESERVE_DATE_OUT]", "qrySCHEDULE", "[VEHICLE_ID]=" & Me![VEHICLE_ID]) And (Forms!PickDates!TimeOut) <= DLookup("([RESERVE_TIME_IN])", "qrySCHEDULE", "[VEHICLE_ID]=" & Me![VEHICLE_ID]))