Results 1 to 2 of 2
  1. #1
    monkeyhead is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    3

    Displaying only free time slots

    Hi there,



    What I'm trying to do is the following:-

    Query my database to show only the time-slots which haven't been used and populate it to a drop down box. (I know how to populate it to the drop down box.)

    This is what I have:- (Tables)

    Availability:-
    AvailabilityTime
    EmployeeId

    Appointment:-
    AppointmentTime
    AppointmentDate
    ClientID
    EmployeeId

    From researching around I'm pretty certain I need to have a join command in my SQL statement.
    To me the logical way of doing this is that in order to achieve what I want I need to check the AvailabilityTime and employee ID against that in the appointments table and if there isn't a match that should mean that chosen appointment time is free so this gives grounds to display all available free slots.

    The problem is I am not quite sure how to go about doing this SQLwise, any suggestions would be greatly appreciated!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Join on EmployeeID and time fields sounds right. Jointype: show all records from Availability and only those from Appointments that are equal. Criteria under the Appointment.EmployeeID field: Is Null
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-26-2012, 05:15 PM
  2. Replies: 8
    Last Post: 01-20-2012, 05:07 PM
  3. How to show monthly % allocation in database
    By Aneta in forum Database Design
    Replies: 11
    Last Post: 08-25-2011, 08:27 AM
  4. Access Database no show?
    By Stealth in forum Access
    Replies: 9
    Last Post: 08-14-2011, 02:03 PM
  5. Query, show top 10
    By lostinspace in forum Queries
    Replies: 4
    Last Post: 05-10-2010, 12:18 PM

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