Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
将目录数的NodeMouseDoubleClick事件改为:
Dim Vals() As String = e.Node.FullPath.Split("\")
Dim frm As WinForm.Form = Forms("基础信息录入窗口")
If frm.Opened
Dim xz As WinForm.TextBox = Forms("基础信息录入窗口").Controls("乡镇")
Dim cz As WinForm.TextBox = Forms("基础信息录入窗口").Controls("村")
Dim zb As WinForm.TextBox = Forms("基础信息录入窗口").Controls("组")
xz.Value = vals(0)
If vals.Length > 0 Then
cz.Value = vals(1)
End If
If vals.Length > 1 Then
zb.Value = vals(2)
End If
End If
e.Form.Close()
If e.Node.Level = 0 Then
Dim Vals() As String = e.Node.FullPath.Split("\")
Dim Filter As String = "[乡镇] = '" & Vals(0) & "' "
Tables("表A").Position = Tables("表A").findRow(Filter,0,False)
ElseIf e.Node.Level = 1 Then
Dim Vals() As String = e.Node.FullPath.Split("\")
Dim Filter As String = "[村] = '" & Vals(0) & "'and [组] = '" & Vals(1) & "' "
Tables("表A").Position = Tables("表A").findRow(Filter,0,False)
ElseIf e.Node.Level = 2 Then
Dim Vals() As String = e.Node.FullPath.Split("\")
Dim Filter As String = "[乡镇] = '" & Vals(0) & "'and [村] = '" & Vals(1) & "' and [组] = '" & Vals(2) & "' "
Dim Vals1() As String = e.Node.FullPath.Split("\")
Dim frm As WinForm.Form = Forms("基础信息录入窗口")
If frm.Opened
Dim xz As WinForm.TextBox = Forms("基础信息录入窗口").Controls("乡镇")
Dim cz As WinForm.TextBox = Forms("基础信息录入窗口").Controls("村")
Dim zb As WinForm.TextBox = Forms("基础信息录入窗口").Controls("组")
xz.Value = vals(0)
If vals1.Length > 0 Then
cz.Value = vals(1)
End If
If vals1.Length > 1 Then
zb.Value = vals(2)
End If
End If
e.Form.Close()
End If
这样加进去就可以了
由于控件未绑定表,如何将这些未绑定表的控件内的数据保存到表相应的行和列内?
谢谢
直接写入:
Tables(" 表名").Current("列名") = Forms("窗口名").Controls("控件名").Value