--
If e.Sender.Value<> "" And Tables("payInfo).Current("name") = "" Then
Dim nlist As List(of DataRow) = DataTables("payInfo").Select("tel = \'" & e.Sender.Text
& "\'")
If nlist IsNot Nothing Then
Tables("payInfo").current("name") = nlist(0)("name")
Dim cb As WinForm.ComboBox = e.Form.Controls("nameBox")
cb.ComboList = DataTables("payInfo").GetComboListString("name","[tel] = \'"&
e.sender.value &"\'")
End If
ElseIf e.Sender.Value<>"" And Tables("payInfo).Current("name") <> "" Then
Dim dr As DataRow
dr = DataTables("payInfo").find("tel = \'"&Tables("payInfo").Current("tel")&"\' And name
= \'"& e.Sender.Value &"\'","ref Desc",1)
If dr IsNot Nothing Then
If Forms("CC收费系统").Opened Then
Tables("payInfo").Current("id") = dr("id")
End If
Else
Tables("payInfo").Current("id") = "XS"&Tables("payInfo").Current("ref")
End If
End If
这个就是写在comBox控件leave事件中出错的代码。
但是另一个comBox控件leave事件中,这种表达式又没有问题!
[此贴子已经被作者于2013-5-17 16:07:42编辑过]