I have a database which records faults and also use of company vehicles for that fault. i have a drop down list for vehicle registration and added option of private/ public transport/ Not applicable. I would like to monitor faults that require vehicles to be used after business hours.
Business hours are monday to thursday 8 am - 4.30pm and Friday 8am - 4pm. I would like to check if fault occurs after this hours and if a vehicle was used, display on a separate field "outside working hours" for that particular record. I would also like to monitor faults that use vehicles that start within business hours but are not completed within business hours.
i tried a very basic code to compare time, which did not take into regard which day it was or if vehicle was used or not.
Code:
me.vehicleuse= iif(# 8:00:00 am # < [Date_fault_lodged] > # 4:30:00 pm #, "outside working hours", "")