一段TreeView1控件NodeMouseClick事件的代码,保存后点击目录树的节点,跳出错误提示:“运算符后缺少操作数”。应该如何修改代码,请各位老师指教。谢谢!!
Dim dw,bm,xm As String
If e.Node.Level = 2 Then
Dim Value()As String
Value = e.Node.FullPath.Split("\")
dw = "[单位] = '" & Value(0) & "'"
bm = "[部门] = '" & Value(1) & "'"
xm = "[姓名] = '" & Value(2) & "'"
End If
Dim dr As DataRow
dr = DataTables("用户表").Find("[单位] = '"& dw &"' And [部门] = '"& bm &"' And [姓名] = '"& xm &"'"
If dr IsNot Nothing Then
With Forms("用户资料").Controls("TextBox2")
.Value = dr("姓名")
End With
With Forms("用户资料").Controls("TextBox3")
.Value = dr("单位")
End With
With Forms("用户资料").Controls("TextBox4")
.Value = dr("部门")
End With
With Forms("用户资料").Controls("TextBox5")
.Value = dr("职务")
End With
End If

此主题相关图片如下:i.png

[此贴子已经被作者于2013-9-6 14:48:12编辑过]