Dim t As Row = Tables("收购").current()
Dim Total As Integer
Dim Amount As Double
With Tables("收购.销售")
Total = .Compute("Sum(份数)")
Amount = .Compute("Sum(重量)")
End With
Total = t("头数") - Total
Amount = t("重量") - Amount
If Total = 0 And Amount = 0 Then
For Each t1 As Row In Tables("收购")
If t1.Isnull("重量") Then
t1("销售已录入") = False
Else
t1("销售已录入") = True
End If
Next
For Each t2 As Row In Tables("收购.销售")
If t2.Isnull("重量") Then
t2("修改") = False
Else
t2("修改") = True
End If
Next
With Tables("收购")
.Position = .Rows.Count - 1
End With
Forms("录入销售").Close()
Forms("录入窗口").Open()
Else
MessageBox.Show("与收购不符,请修改收购!")
End If
为什么“销售已录入”逻辑不能正确显示?造成录入一行选true,下一行也选true.