Results 1 to 8 of 8
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Black out booked times


    Good morning!

    I am working on a scheduling component in which I have all of the work times for the day listed in 15 minute increments. The user can schedule a client to a specific time slot. The length of time for the appointment is 30 minutes. When a client is added to the schedule, the end time of the appointment is updated:
    Code:
    Me.EndTime = DateAdd("n", Me.bidtime, Me.Appointments_StartTime)
    . I'm trying to figure out a way to black out the 15 minute increment time between the starttime and endtime. Just with the client's name if possible. Or possibly remove it from the schedule (as the time is no longer available). Any suggestions? TIA!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    on a form, choose the client, (combo)
    select the startTime for that day,
    the default sets the endtime (combo) , txtEnd = DateAdd("n",30, txtStart)
    then user can change endtime if needed,
    click save btn to run append query to write the record:

    tAppts tbl
    userid, clientID, Subject, startTime, EndTime

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Hey Gina,

    Not quite sure if this is in a form, table or both.......

    But,.... you can calculate the number of 15 min intervals between the known start date/time and the end date/time using
    Code:
    (DateDiff("n", Me.Appointments_StartTime, Me.Endtime)\15)-1
    then code a loop to put the client's name (or conditional formatting to change the color) in the 15 min block.

    If the start time is 9:00 and the end time is 9:30, there is 1 15 min interval.
    If the start time is 9:00 and the end time is 10:00, there are 3 15 min intervals.

    Am I way off base??

  4. #4
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Hi Steve! You nailed it! But I'm not exactly sure how to go about it. I got the "Between" calc to work fine, not sure what to do next. Get me started? Thank you!!!

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Get me started?
    Sure, I'll try. But what are you working with??
    Would be helpful to see the dB... or an image.....

  7. #7
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Thanks Orange! That's awesome!

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    You are welcome. The Datapig site has may excellent videos. They are a little older (~Access 2003) but the concepts and examples are clear.
    The listbox is quite useful.

    Good luck with your project.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-25-2015, 05:02 PM
  2. Black, White or White, Black
    By Spur52 in forum Queries
    Replies: 3
    Last Post: 11-25-2014, 04:36 PM
  3. Show employee's booked jobs in a calendar view
    By 11Edward23 in forum Forms
    Replies: 2
    Last Post: 01-06-2014, 08:51 PM
  4. Double Booked
    By Cran29 in forum Queries
    Replies: 0
    Last Post: 01-15-2011, 08:18 AM
  5. double booked entries
    By qbc in forum Access
    Replies: 3
    Last Post: 08-28-2009, 10:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums