Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004

    Unanswered: Calculating Time difference

    I have the following if statement in access, where I'm trying to keep a user from selecting an End Time that is less than the Start Time. The range is from 7:00 am to 7:00pm in 15 minute increments. I know that the "Hour" part would work if I didn't have the time broken up in 15 minute increments, but I need I formula that will calculate the difference by that. Here is the formula that I have set up now.

    If Hour(Me.End_Time) < Hour(Me.Start_Time) Then
    MsgBox ("End Time should be greater than or equal to Start Time")
    Cancel = True

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    consider cheating!
    If End_Time < Start_Time Then

    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Well heck, I tried replacing hour with TimeValue and its working perfect. Next time, I'll just cheat =)

Posting Permissions

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