It's that "time" again, where one cannot make head or tail of this situation. The problem i'm having is, is once this code is run through, i am being returned a negative number for hours as opposed to the correct amount of time left. in the database being called the Due hour is 3, and the hour(now) for example is 18, however it is throwing the value of -15 at me as opposed to 9 or such.

the first msgbox returns the values "hour now 18, due hour is 3"

clearly hour now is greater than due hour, and it is not running it throught the if statement "if hour(now) > Thour then" etc etc etc.

Thour being the due hour

so this has me stumped :S

any ideas?

(My explaination might not be that clear, if anything needs clarifying i will do so with gusto, or such)

Code:
   

If Minute(Now) > Tminute Then
        HourCount = HourCount + 1
        MinuteCount = (Tminute - Minute(Now) + 60)
    Else
        MinuteCount = Tminute - Minute(Now)
    End If

        MsgBox "Hour now is" & Hour(Now) & vbCrLf & "Due hour is: " & Thour
        
    If Hour(Now) > Thour Then
        DayCount = DayCount + 1
        HourCount = HourCount + Thour - Hour(Now)
        MsgBox HourCount & "hour is greater than due hour"

    Else
    
        HourCount = Thour - Hour(Now)


    End If