我做了个下拉窗口,然后表格和窗体中都有调用,点确定后,表格中就可以更新数据,窗体中就无法更新,请老师
下面是确定按钮里的代码,请问老师可能是哪里出的问题
Dim s As String
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
If nd.Checked Then ' 这个节点选中的话
Dim pd As WinForm.TreeNode = nd.ParentNode '获取父节点
If pd IsNot Nothing Then '有父节点
If pd.Checked = False Then '父节点没有选中
s = s & "," & nd.name
End If
Else '没有父节点
s = s & "," & nd.name
End If
End If
Next
e.Form.DropDownBox.Value = s.trim(",")
e.Form.DropDownBox.CloseDropdown

此主题相关图片如下:截图_20220607160436.gif

此主题相关图片如下:1111.png
[此贴子已经被作者于2022/6/7 16:05:08编辑过]