以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]程序报错  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=38446)

--  作者:dd6b
--  发布时间:2013/7/29 18:27:00
--  [求助]程序报错

For Each sj As DataRow In DataTables("工资表").DataRows
If sj.IsNull("姓名")=False
 sj("工资月份") =  nian.Value & "年" & yue.Value & "月"
End If
Next

Dim dr As DataRow
dr = DataTables("工资总表").find(" [工资月份] = sj("工资月份") ")
If dr IsNot Nothing
MessageBox.Show("此月工资已经存在!")

提示 :应为逗号、“)”或有效的表达式继续符。

错误代码:dr = DataTables("工资总表").find(" [工资月份] = sj("工资月份") ")


--  作者:狐狸爸爸
--  发布时间:2013/7/29 18:36:00
--  

For Each sj As DataRow In DataTables("工资表").DataRows
    If sj.IsNull("姓名")=False
        sj("工资月份") =  nian.Value & "年" & yue.Value & "月"
    End If
Next
Dim dr As DataRow
dr = DataTables("工资总表").find(" [工资月份] = " & sj("工资月份"))
If dr IsNot Nothing
    MessageBox.Show("此月工资已经存在!")
End If

 

好好看看:

http://www.foxtable.com/help/topics/1284.htm