错误信息如下:
NET Framework 版本:2.0.50727.8825
Foxtable 版本:2018.7.9.1
错误所在事件:fa piao台账,CurrentChanged
详细错误信息:
此行已从表中移除并且没有任何数据。BeginEdit() 将允许在此行中创建新数据
错误所在事件代码如下:(窗口表副本控件事件代码)
If Tables("高开虚开fa piao窗口_Table2").rows.count > 0 Then
Dim dr As DataRow = e.Table.Current.DataRow
Dim wz As Integer = Tables("fa piao台账").FindRow(dr)
If wz >=0 Then
Tables("fa piao台账").Position = wz
End If
Tables("fa piao台账").Current.load() '重新加载当前行的最新记录
End If
主表的PrepareEdit事件代码如下:
If e.IsFocusCell Then '如果是焦点所在单元格
If e.Col.Name = "开piao类别" Then '如果正在编辑的是供应商名称
e.Col.Combolist = DataTables("fa piao类别档案").GetComboListString("税率", "[标识列] = '财务'") '从供应商档案表提取该索引的供应商作为列表项目
End If
End If
主表的DataColChanged事件代码如下:
Select Case e.DataCol.Name
Case "财务处理时间","项目编号","客户名称","开piao类别","fa piao号码","开piao金额","作废","代收代付客户名称"
e.DataRow("发生时间") = Date.Now
e.DataRow("经手人") = User.Name
End Select
If e.DataCol.Name = "项目编号" Then
Dim DD As DataRow
DD = DataTables("项目基础表").Find("[项目编号] = '" & e.NewValue & "'")
If DD IsNot Nothing
e.DataRow("公司标记") = DD("公司标记")
e.DataRow("执行人姓名") = DD("执行人姓名")
End If
ElseIf e.DataCol.Name = "开piao人" Then
Dim FF As DataRow
FF = DataTables("员工档案").Find("[员工姓名] = '" & e.NewValue & "'")
If FF IsNot Nothing
e.DataRow("公司标记") = FF("公司标记")
End If
End If
老师帮忙看看是什么情况,谢谢