改代码,之前回答过你了啊,15楼。
Dim d As Date = e.Form.Controls("Calendar1").value.Date
Tables("Timing").Filter ="TimingStarttime >= #" & d & "# and TimingStarttime < #" & d.AddDays(1) & "#"
Tables("Productionlog").Filter = "Startlinerecording >= '" & Format(d, "yyyy-MM-dd HH:mm") & " 0000" & "' and Startlinerecording < '" & Format(d.AddDays(0), "yyyy-MM-dd") & "00:00 0000" & "'"
Dim drs,drs2,drs3,drs4,drsMid,Timedrs,drsHSE,drsCrew,drsProduction As List(Of DataRow)
drs=DataTables("Timing").Select("TimingStarttime >= #" & d & "# and TimingStarttime < #" & d.AddDays(1) & "#" )
drs2=DataTables("Productionlog").Select("Startlinerecording >= '" & Format(d, "yyyy-MM-dd HH:mm") & " 0000" & "' and Startlinerecording < '" & Format(d.AddDays(0), "yyyy-MM-dd") & "00:00 0000" & "'")
messagebox.show(drs.count & " ," & drs2.count)