Generating Date & Time Slots

  • Thread starter Thread starter Nick1966
  • Start date Start date
N

Nick1966

Hi

I am creating a database to manage bookings at a centre, is there a way of
automatically generating date and time slots in advance (manually inputting
would be time consuming). The requirement is that bookings can be made up to
28 days in advance and each booking is for 2 hours, with each session
staring on the odd hour i.e. 9:00; 11:00; 13:00 etc. The session table
fields would be Session_ID, Date, Day, Time. The best solution would be if
this process was automatic on starting the database.

If this is possible could someone point me in the right direction.

Many thanks

Nick
 
Do you want to set the hours automatically increased by 2 hours for
each record?

Madhivanan
 
Hi

Yes, that is correct. I will need to filter out records that are not
required such as Sundays, Holidays and hours that the centre is closed but I
will do that via a query or filter.

Nick
 
Hi

I am creating a database to manage bookings at a centre, is there a way of
automatically generating date and time slots in advance (manually inputting
would be time consuming). The requirement is that bookings can be made up to
28 days in advance and each booking is for 2 hours, with each session
staring on the odd hour i.e. 9:00; 11:00; 13:00 etc. The session table
fields would be Session_ID, Date, Day, Time. The best solution would be if
this process was automatic on starting the database.

Creating vacant "placeholder" records would be unwise and unnecessary!
If there's an event for a timeslot, fill it in - if there's not, then
don't. In addition, given the way Access handles date/time fields, you
should probably NOT have separate Date, Day (what's Day anyway, as
distinct from Date?) and Time fields; if you do, you should certainly
not use those fieldnames as they are all reserved words.

Consider having a Listbox based on a small auxiliary table with one
date/time field containing the valid starting times, and a datepicker
calendar control. You could add a new record to the bookings table by
selecting a date from the calendar, and a time from the listbox, and
simply adding the values and storing the sum in the table's
SessionTime. If you want to see the day name (Tuesday frex) simply use
a format for the field which displays the name.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top