正常的代码应该是这样:
Dim tbl As Table = Tables("销售选客户_Table1")
If e.KeyCode = Keys.Up Then
tbl.Position = tbl.Position - 1
e.Cancel = True
ElseIf e.KeyCode = Keys.Down Then
tbl.Position = tbl.Position + 1
e.Cancel = True
ElseIf e.KeyCode = Keys.Enter Then
If tbl.Current IsNot Nothing Then
Tables("chuhuodan").Current("_Identify") = tbl.Current("_Identify")
Tables("chuhuodan").Current("kehuname") = tbl.Current("kehuname")
Tables("chuhuodan").Current("tel") = tbl.Current("tel1")
Tables("chuhuodan").Current("dizhi") = tbl.Current("dizhi")
End If
e.Cancel = True
e.Form.Close()
End If
也就是向出货单写入选择的客户资料,你原来的代码,是向客户表写入选择的客户,当然是不行的。
还有两处类似的代码,你自行修改一下吧。
[此贴子已经被作者于2011-9-23 11:41:53编辑过]