Hi,
Based on post in this forum,I was able to calculate time elapsed based on start and end times.
What I am trying to do is after getting the time elapsed. If the time elapsed is greater than 4 hours an error message is generated.
I have not been able to do this please take a look at what I have below:
[code=vb]Dim intGrounTHour As Integer
Dim intGrounTMinute As Integer
Dim intResult As Integer
Dim intTGTime As Integer
intTGTime = 240
intGrounTHour = Format(Me.Total .Value, "h")
intGrounTMinute = Format(Me.Total .Value, "N")
intResult = CInt( intGrounTHour) + CInt(intGrounTM inute )
If intResult > intTGTime Then
MsgBox "Please ensure that the times that you entered are correct", vbCritical, "Data Entry Error"
Me.txtarrtime.S etFocus
End If[/code]
Please help
Based on post in this forum,I was able to calculate time elapsed based on start and end times.
What I am trying to do is after getting the time elapsed. If the time elapsed is greater than 4 hours an error message is generated.
I have not been able to do this please take a look at what I have below:
[code=vb]Dim intGrounTHour As Integer
Dim intGrounTMinute As Integer
Dim intResult As Integer
Dim intTGTime As Integer
intTGTime = 240
intGrounTHour = Format(Me.Total .Value, "h")
intGrounTMinute = Format(Me.Total .Value, "N")
intResult = CInt( intGrounTHour) + CInt(intGrounTM inute )
If intResult > intTGTime Then
MsgBox "Please ensure that the times that you entered are correct", vbCritical, "Data Entry Error"
Me.txtarrtime.S etFocus
End If[/code]
Please help
Comment