'check if same date exist to do new sorting
Dim starttimechk As String
Dim endtimechk As String
Dim starttimechk2 As String
Dim endtimechk2 As String
nvlb19.Text = "0"
For i = 0 To Table1.Size - 1
Table1.SetValue(19,i,"0")
If Table1.GetValue(4,i) = lb4.Text AND Table1.GetValue(18,i) > selecteddateday Then
tabsort = True
starttimechk = Table1.GetValue(1,i)
starttimechk = (starttimechk.SubString2(0,2) * 60) + starttimechk.SubString2(3,5)
starttimechk2 = Table1.GetValue(1,selecteddateday)
starttimechk2 = (starttimechk2.SubString2(0,2) * 60) + starttimechk2.SubString2(3,5)
endtimechk = Table1.GetValue(2,selecteddateday)
endtimechk = (endtimechk.SubString2(0,2) * 60) + endtimechk.SubString2(3,5)
endtimechk2 = Table1.GetValue(2,i)
endtimechk2 = (endtimechk2.SubString2(0,2) * 60) + endtimechk2.SubString2(3,5)
If endtimechk <> "--:--" AND endtimechk2 <> "--:--" Then
If endtimechk < starttimechk2 Then
' If starttimechk <> endtimechk Then
Table1.SetValue(19,i,"1")
nvlb19.Text = "1"
' End If
Else
If endtimechk > starttimechk Then
Table1.SetValue(19,i,"1")
nvlb19.Text = "1"
End If
End If
End If
Else If Table1.GetValue(4,i) = lb4.Text AND Table1.GetValue(18,i) < selecteddateday Then
tabsort = True
starttimechk = Table1.GetValue(1,selecteddateday)
starttimechk = (starttimechk.SubString2(0,2) * 60) + starttimechk.SubString2(3,5)
starttimechk2 = Table1.GetValue(1,i)
starttimechk2 = (starttimechk2.SubString2(0,2) * 60) + starttimechk2.SubString2(3,5)
endtimechk = Table1.GetValue(2,i)
endtimechk = (endtimechk.SubString2(0,2) * 60) + endtimechk.SubString2(3,5)
endtimechk2 = Table1.GetValue(2,selecteddateday)
endtimechk2 = (endtimechk2.SubString2(0,2) * 60) + endtimechk2.SubString2(3,5)
If endtimechk2 <> "--:--" AND endtimechk <> "--:--" Then
If endtimechk < starttimechk2 Then
' If endtimechk <> starttimechk Then
Table1.SetValue(19,i,"1")
nvlb19.Text = "1"
' End If
Else
If endtimechk > starttimechk Then
Table1.SetValue(19,i,"1")
nvlb19.Text = "1"
End If
End If
End If
End If
Next
'end checking