\'新增
With Tables("库存")
if .Current isnot nothing then
If .Current.DataRow.RowState = DataRowState.Unchanged Then \'如果当前行未曾修改
库存_库存编辑_状态="新增"
.AddNew()
.Cols("当前库存").AllowEdit= True
\' Forms("库存编辑").Controls("TextBox1").BindingField = "" \'"库存.货品编码"
Else
MessageBox.Show("该记录已经被修改,若想保存结果请先<保存修改>,否则请<撤销修改>! ")
End If
end if
End With
Dim t1 As WinForm.TextBox = e.Form.Controls("TextBox1")
t1.Select