老师,如图出现的错误

此主题相关图片如下:捕获.png

Dim con As Integer = DataTables.Compute("sum(数量)","产品名称='" & DataTables("表A").current("产品名称") & "' and _sortkey < " & DataTables("表A").current("_sortkey"))
Dim s As String
Dim drs As List(Of DataRow) = DataTables("表B").Select("产品名称= '" & DataTables("表A").current("产品名称") & "'","出货日期")
Dim dr As DataRow
Dim sl As Integer = DataTables("表A").current("数量")
Do While drs.Count > 0
dr = drs(0)
If con >= dr("数量") Then
con = con - dr("数量")
Else
Dim c1 As Integer = dr("数量") - con
con = 0
If s > "" Then s = s & " + "
If c1 >= sl Then
s = s & dr("出货日期") & " /" & sl & "pc" & IIF(s.Contains("+"),"s","")
Exit Do
Else
s = s & dr("出货日期") & " /" & c1 & "pcs"
sl = sl - c1
End If
End If
drs.RemoveAt(0)
Loop
DataTables("表A").current("出货日期备注") = s