以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 我这段代码的问题,设置对象变量或WITH块变量 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=141052) |
-- 作者:cyrollin -- 发布时间:2019/9/20 11:31:00 -- 我这段代码的问题,设置对象变量或WITH块变量 出现错误信息: 未设置对象变量或WITH块变量 Dim drt As Row Dim bz As String = fdr("备注") Dim drbz = DataTables("表A").find("编号 = \'"& bh &"\'and _Identify < " & drt("_Identify"),"_Identify desc") If drbz IsNot Nothing AndAlso (bz.contains("款") Or bz.contains("票") Or bz.contains("钱")) Then drt("备注") = IIF(drbz.isnull("备注"),Nothing,drbz("备注")) + ", " + bz Else drt("备注") = IIF(drbz.isnull("备注"),Nothing,drbz("备注")) End If |
-- 作者:有点蓝 -- 发布时间:2019/9/20 11:53:00 -- Dim drt As Row \'这里没有赋值,drt是不能使用的 Dim bz As String = fdr("备注") Dim drbz = DataTables("表A").find("编号 = \'"& bh &"\'and _Identify < " & drt("_Identify"),"_Identify desc") If drbz IsNot Nothing AndAlso (bz.contains("款") Or bz.contains("票") Or bz.contains("钱")) Then drt("备注") = IIF(drbz.isnull("备注"),Nothing,drbz("备注")) + ", " + bz Else drt("备注") = Nothing End If
|