Link to home
Start Free TrialLog in
Avatar of Prashantbhatnagar
Prashantbhatnagar

asked on

How to control the Time Slots?

I'm working on an application used for booking Transport cabs, since we work in shifts; employees use the transport facility as per the shift schedule. The shift schedule as well as the transport schedule is prepared for a fortnight. To manage the transport system efficiently we have a policy that user should not select a time slot within 12 hour window for pickup and should not pick a drop slot with in 1 hour window. I have created a form to program the slots like 7:00, 11:30, 15:45, and 17:45 etc. User has option to select the predefined slots from the master form. Im using @dbcolumn formula to select the slots from a view.
Now what I want to program is when user tries to change the pickup slot lets say around 7:00 in the morning, he should only see the slots available on or after 19:00 similarly if it he tries to change the drop slot at 7:00 he should able to select any slot after 8:00. Pls help in developing this functionality.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Prashantbhatnagar
Prashantbhatnagar

ASKER

The problem is the time slots I have put are 7:00, 9:00, 11:30, 15:45, 17:45, 20:45, 23:30, 00:30 - Now when I compare using SELECT Form = "Pickup Slots" &@TextToTime(PickupS)>@Adjust(@Now;0;0;0;12;0;0) it does not work. The when the user try to change the slot at any point of the day the slot which are within 12 hours should be hidden.
One crude method which I can think of is storing the time slots in different views and calling the views in the combobox depending on the time of the day.