以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  引用临时表的问题?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=91822)

--  作者:zsslly
--  发布时间:2016/10/19 18:40:00
--  引用临时表的问题?
Dim dr As DataRow
dr = Tables("设计档案管理_table1").current.DataRow
If dr IsNot Nothing Then
    Dim wz As Integer = Tables("峰和设计部").FindRow(dr)
    If wz >= 0 Then
        Tables("设计部").Position = wz
    End If
End If


以上的代码中,"档案管理_table1"这个表是临时表,这段代码引用不到,不知道应该怎么改?求大侠指点!

用此代码出现如图报错:


此主题相关图片如下:qq截图20161020005934.jpg
按此在新窗口浏览图片
[此贴子已经被作者于2016/10/20 1:07:46编辑过]

--  作者:zsslly
--  发布时间:2016/10/19 18:56:00
--  
求指点?
--  作者:有点蓝
--  发布时间:2016/10/19 20:37:00
--  
Dim dr As Row
dr = Tables("档案管理_table1").current
If dr IsNot Nothing Then
    Dim wz As Integer = Tables("峰和设计部").FindRow("编号=\'" & dr("编号") & "")
    If wz >= 0 Then
        Tables("峰和设计部").Position = wz
    End If
End If

--  作者:zsslly
--  发布时间:2016/10/20 1:09:00
--  
"档案管理_table1"是副本表,不是临时表
--  作者:有点蓝
--  发布时间:2016/10/20 8:32:00
--  
看3楼,也可以改成

Dim dr As Row
dr = Tables("档案管理_table1").current
If dr IsNot Nothing Then
    Dim wz As Integer = Tables("峰和设计部").FindRow("[_Identify]=\'" & dr("_Identify") & "")
    If wz >= 0 Then
        Tables("峰和设计部").Position = wz
    End If
End If