Foxtable(狐表)用户栏目专家坐堂 → [求助]遍历如何做?


  共有2987人关注过本帖树形打印复制链接

主题:[求助]遍历如何做?

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/5/8 10:39:00 [显示全部帖子]

改一下

 

With Tables("档案管理总表")
    If .Current IsNot Nothing Then
        .Current.Save()
    End If
End With
Dim r As Row = Tables("档案管理总表.档案管理明细").Current
With Tables("档案管理总表.档案管理明细")
    If r("档案编号") = Nothing OrElse r("档案名称") = Nothing OrElse r("档案类型") = Nothing OrElse r("归档日期") = Nothing OrElse r("保管期限") = Nothing OrElse r("档案明细名称") = Nothing OrElse r("部门1") = Nothing OrElse r("部门2") = Nothing OrElse r("办事处") = Nothing OrElse r("档案移交人") = Nothing OrElse r("档案室") = Nothing OrElse r("档案柜") = Nothing OrElse r("档案明细名称") = Nothing OrElse r("档案明细日期") = Nothing OrElse r("档案明细编号") = Nothing
        Messagebox.show("档案明细录入不全,请录入!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Else     
        For i As Integer = 0 To .Rows.count - 1
            .Rows(i).Locked = True

            .Rows(i).Save
        Next
        Messagebox.show("档案明细已保存!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        DataTables("档案管理总表").AllowEdit = False
        DataTables("档案管理明细").AllowEdit = False
    End If
End If
End With

[此贴子已经被作者于2014-5-8 10:57:48编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/5/8 11:06:00 [显示全部帖子]

 呵呵,写错了,你把4楼的代码再复制一次。

 

        For i As Integer = 0 To .Rows.count - 1
            .Rows(i).Locked = True

            .Rows(i).Save
        Next

[此贴子已经被作者于2014-5-8 11:06:53编辑过]

 回到顶部