I am working on a scheduling DB where I need to provide selection of available time slots. I first have the user select a start-time, and based on the start-time I want it to display available end-times (using a listbox for each). Using 30 minute increments.
Example scenario: If there was an appt scheduled already in the db from 10-11 and the user selected 9:30 as start-time, it should show no available end-times since the first available end-time would be 10:00, but that is already booked so no results are shown. If the user selected 11 as a start-time, then it should show 11:30,12:00,12:30 and so on, until the next start-time is found in the table which would block it from being an available end-time. The time-range I am working with is 7:00am-5:00pm.
I am currently recording the times in a table (ID,Date,TimeSlot), with date being the date and TimeSlot being the start-time with an understood 30 minute increment. So if they select 10 as start, 12 as end, I am writing to the table: Date/10:00 ; Date/10:30 ; Date/11:00 ; Date/11:30
Is it possible to do a dlookup on each row returned from a query? I was thinking of querying my start-times table and with each row returned, do a dlookup() on my appts table to see if that date/time-slot exists as being booked, if not, confirm it is > starttime and if so, return it to end-times listbox.
Anyone have any ideas\comments?