If e.Selected Then '如果选择了值
Dim tbl As Table = Tables("窗口1_Table1")
If tbl.Current IsNot Nothing Then
e.Form.DropDownBox.Value = tbl.Current("客户ID")
End If
If e.Form.DropTable IsNot Nothing Then '如果是通过表下拉的e.Form.DropTable.current("客户名称") = tbl.Current("客户名称")
e.Form.DropTable.FinishEditing()
Else '如果是通过窗口下拉的
e.Form.DropDownBox.WriteValue()
End If
End If