Displaying available dates/times

Sturmtruppe

Registered User.
Local time
Today, 14:03
Joined
Mar 26, 2009
Messages
18
I have a table that shows dates & times for interviews, and have just created a form for it as well. What i want to do is, when it comes to entering date & time for the interview is have a combo box or something similar pop up to list all the available times on the date specified in the date field.

So lets say someone wants an interview on the 25/05/2009, i would type that in, then go to the time field which would show me all available times only, so that the interview doesnt clash with any others.

I have a very rusty knowledge of access 03 so any help be appreciated.

thank you
 
Last edited:
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]);
 
I managed to get the table set up with a field called 'times' listing all the times we schedule interviews. But thats about all i could manage since i havent used access in over a year, i can only remember a very little.

ps. how do you go about setting the row source as code since it only allows tables, values & fields?
 
Last edited:
1-You can go th the design view of your table and select the field which you will insert time on it.
2- make data type is lookup wizard and add all times which you want
it is weak way but easy
 
That never occured to me tbh, i also found out how to stop double bookings.

Now at the moment it works but would require the user to keep trying different times until they find one that works.

I have the default value show the last time inputted so at least it reduces the problem for now.
 

Users who are viewing this thread

Back
Top Bottom