Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 97 problem (97)

    I am trying to model a Dentist's appointment system. I have created a query that calculates the time an appointment finishes for a particular dentist using start time and treatment length located in different tables. I wish to display the start time for the next available appointment on the Booking form. Is there a way I can compare the time value in each record of my query and determine the time difference between them? If this difference is greater than 35 minutes then the first record that matches the condition is selected. Or is there a more effeicient way? Thanks
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 97 problem (97)

    If I understand correctly, you have a known endtime for the current appointment, and you want to find all the available timeslots where the next appointment can be made??? The first slot where the time difference is > 35 minutes is to be selected???

    (aircode)

    SELECT * from tblAppointmentSlots where (datediff("nn",[CurrentEndTime],[AppointmentStartTime]) > 35) and (datediff("nn",[CurrentEndTime],[AppointmentStartTime]) < 240) ORDER BY AppointmentStartTime

    should give you a list of all the candidate time slots.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access 97 problem (97)

    This subject has been discussed many times. Do a Lounge Search on scheduling to see some of the previous threads.
    Charlotte

  4. #4
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 97 problem (97)

    Many thanks for your help. Unfortunately, I am getting syntax error messages when I use the expression you supplied. I substituted the table and field names for those in my database. A little more guidance as to using the expression would be greatly appreciated.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •