Foxtable(狐表)用户栏目专家坐堂 → 表A与表B 匹配数据


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

主题:表A与表B 匹配数据

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


加好友 发短信
等级:九尾狐 帖子:2927 积分:20167 威望:0 精华:0 注册:2012/2/3 17:45:00
  发帖心情 Post By:2015/7/25 22:36:00 [显示全部帖子]

建一个窗口为停靠类型 属于表A  建一个Button 控件 
Dim dr1 As DataRow
If DataTables("表a") IsNot Nothing And DataTables("表b") IsNot Nothing Then
    For Each dr As DataRow  In DataTables("表a").DataRows
        If dr("流水号") IsNot Nothing AndAlso dr("员工号") IsNot Nothing Then
            dr1=DataTables("表b").Find("流水号='"& dr("流水号") &"' And 员工号='"& dr("员工号") &"'")
            If dr1 IsNot Nothing Then
                dr("第3列")=dr1("名字")
            End If
        End If
    Next
End If

 回到顶部