Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    Location
    Hamilton,Ontario
    Posts
    132

    Unanswered: How to Compare Time

    If adrs3![From] = txtTime Or (txtTime >= adrs3![From] And txtTime < adrs3![To]) Then

    im trying to check if for example.10:30 is between From and To Fields in databae . IN database From=10 and To=11 , Above statement works to check but when i try to book for 11 it says its already scheduled . Any ideas? thanks in advance

  2. #2
    Join Date
    Sep 2003
    Posts
    228
    do you need a <= for the TO as well?

  3. #3
    Join Date
    Nov 2002
    Location
    Hamilton,Ontario
    Posts
    132
    Quote Originally Posted by ottomatic
    do you need a <= for the TO as well?
    I need < for TO as well .

  4. #4
    Join Date
    Sep 2003
    Posts
    228
    Quote Originally Posted by VBAPROGRAMMER
    If adrs3![From] = txtTime Or (txtTime >= adrs3![From] And txtTime < adrs3![To]) Then

    im trying to check if for example.10:30 is between From and To Fields in databae . IN database From=10 and To=11 , Above statement works to check but when i try to book for 11 it says its already scheduled . Any ideas? thanks in advance
    11 would not meet your criteria in your line of code.
    11 is not equal to 10 AND it is not less than 11.

Posting Permissions

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