增加下列代码后,显示:
.NET Framework 版本:2.0.50727.8941
Foxtable 版本:2019.4.12.1
错误所在事件:表,生产令号,DataColChanged
详细错误信息:
调用的目标发生了异常。
表达式包含无效的字符串常量: '。
是什么原因
If e.DataCol.Name = "已入库数量" Then
If e.NewValue Is Nothing Then
e.DataRow("当月入库数量") = Nothing
Else
Dim dr1 As DataRow
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
Dim Filter As String
dr1 = DataTables("入库信息").Find("[生产令号] = '" & e.DataRow("生产令号") & "' And 入库时间 >= #" & dt1 & "# And 入库时间 <= #" & dt2 & "#" & "'")
If dr1 IsNot Nothing
e.DataRow("当月入库数量") = dr1("当月入库数量")
End If
End If
End If
[此贴子已经被作者于2019/6/5 14:00:22编辑过]