Sturmtruppe
Registered User.
- Local time
- Today, 14:29
- Joined
- Mar 26, 2009
- Messages
- 18
In the image below i have a form for setting up peoples assesments in access 2003, that has the "InterviewDate" & "InterviewTime". Interview Date is just a default value of the previous entry. "InterviewTime" is a combo box that displays all the times from a lookup table.
What ive been trying to do is to find out if there is a way to have times greyed out (or not visible at all would be better i suppose) that are already booked on that day. so on 04/05/2009, 10:00 would be greyed out so i wouldnt select it since it is taken, otherwise a double booking would occur.
Users arent actually able to double book since ive set access to disallow duplicate times on the same day, but with this method, users have to try each day in a trial and error situation which takes up too much time.
I have had some help before which has given me a lot of guidance, which i is on the right track, but i dont understand how to implement points 3 and 4
What ive been trying to do is to find out if there is a way to have times greyed out (or not visible at all would be better i suppose) that are already booked on that day. so on 04/05/2009, 10:00 would be greyed out so i wouldnt select it since it is taken, otherwise a double booking would occur.
Users arent actually able to double book since ive set access to disallow duplicate times on the same day, but with this method, users have to try each day in a trial and error situation which takes up too much time.
I have had some help before which has given me a lot of guidance, which i is on the right track, but i dont understand how to implement points 3 and 4
this is very common. usually you would have:
1) a lookup table for available times throughout the day
2) a combo box for those times available on the form
3) a field i nthe appointments table that has the exact same data as in the lookup table
4) similar code like this for the combo (as the rowsource):Code:SELECT lookuptable.timefield FROM lookuptable WHERE [TIMEFIELD] NOT IN (SELECT maintable.timefield FROM maintable WHERE [timefield] = [yourdateinquestion]);
Attachments
Last edited: