Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]增加复制条件

1楼
苏州老街 发表于:2025/3/25 15:18:00
老师,我想再增加一个复制条件列名称为“房屋主体”,谢谢老师。

If e.DataCol.Name = "项目" Then
    If e.DataRow.IsNull("项目") = False AndAlso e.DataRow.IsNull("抄表日期") = False Then
        Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.NewValue & "' and 抄表日期 is not null and _sortkey <" & e.DataRow("_sortkey"),"_sortkey desc")
        If dr1 IsNot Nothing Then
            e.DataRow("分表上期") = dr1("分表本期")
[此贴子已经被作者于2025/3/25 15:18:42编辑过]
2楼
有点蓝 发表于:2025/3/25 15:22:00
Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.NewValue & "' and 房屋主体='xxx' and 抄表日期 is not null and _sortkey <" & e.DataRow("_sortkey"),"_sortkey desc")
3楼
苏州老街 发表于:2025/3/25 15:43:00
老师,不是黄标出的这个意思,我是想再增加一个条件判断即:“项目”和”房屋主体”,如红色标出的判断的代码。
If e.DataCol.Name = "项目" Then
Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.NewValue & "' and 
房屋主体='xxx' and 抄表日期 is not null and _sortkey <" & e.DataRow("_sortkey"),"_sortkey desc")
[此贴子已经被作者于2025/3/25 15:50:29编辑过]
4楼
有点蓝 发表于:2025/3/25 15:50:00
没看懂
5楼
苏州老街 发表于:2025/3/25 18:26:00

此主题相关图片如下:2025-03-17 12 19 54.png
按此在新窗口浏览图片
If e.DataCol.Name = "项目" Then
    If e.DataRow.IsNull("项目") = False AndAlso e.DataRow.IsNull("抄表日期") = False Then
        Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.NewValue & "' and 抄表日期 is not null and _sortkey <" & e.DataRow("_sortkey"),"_sortkey desc")
        If dr1 IsNot Nothing Then
            e.DataRow("一号楼_上期") = dr1("一号楼_本期")
6楼
有点蓝 发表于:2025/3/25 19:45:00
Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.NewValue & "' and 房屋主体='" & e.DataRow("房屋主体") & "' and 抄表日期 is not null
共6 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01953 s, 2 queries.