'收集并填充字段内容
Dim dst As Table = Tables("入库列表_Table1")
Dim dr As Row = dst.Current '获得选定行
vars("str1") = dr("单据编号") '保存原货品单号,确保变更后可以删除原记录
'生成出入库明细数据
DataTables("hccrk").LoadFilter = "[djcode] = '" & vars("str1") & "'"
DataTables("hccrk").Load(False)
DataTables("hccrkmx").LoadFilter = "[djcode] = '" & vars("str1") & "'"
DataTables("hccrkmx").Load(False)
Dim i As Integer
Dim kz As String = "DateTimePicker1,ComboBox4,TextBox2,ComboBox2,ComboBox6,ComboBox3,TextBox1"
Dim lm As String = "djdate,type,djcode,ckname,bmname,afname,note"
Tables("hccrkmx").AllowEdit = False