Enableing/Disabling Control based on Date and Time

cheftim

Registered User.
Local time
Yesterday, 21:07
Joined
Jan 22, 2007
Messages
33
I think I saw something on this board for how to make a control active or not based on criteria, but I have not been able to find that thread again. Here is my problem:

I have a table with [Arrival_Date], [Arrival_Time],[Departure_Date], and [Departure_Time].

Groups may stay for several days.

I have a form for scheduling meals. I want the text box for (ie) Breakfast to be disabled if the group will not arrive before 7:30am on the first day, but be available for other days during their stay. Also, I want it to be disabled if their departure date & time if before 7:30am.

Any clues?

Thanks,
 
One way would be to put an event procedure on the update of the text box where you input the time of arrival.
Code would look something like:

if txtarrival_time.value < 0730 then
txt_breakfast.enabled = false
else
txt_breakfast.enabled = true
end if
 
Thanks, Macca.

In order to determin the date and time value -can I simply add the arrival date and the arrival time? I don't want the group eliminated from breakfast everyday of their stay, just the first day if the are arriving too late.

Thanks
t
 
would the same code work on the departure date ?? I think it would if it works for the first date should work for the second date ?
 

Users who are viewing this thread

Back
Top Bottom