以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  按钮代码问题求指点!!!!!!  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=63949)

--  作者:lisheng7177
--  发布时间:2015/2/2 1:26:00
--  按钮代码问题求指点!!!!!!

Dim Result As DialogResult
Result = MessageBox.Show("确定导出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question,MessageBoxDefaultButton.Button2)
Dim Cols1() As String = {"工作单位","县公司","姓名","性别","身份证号码","文化程度","鉴定等级","申报鉴定工种","鉴定批次","申报性质","备注","照片","是否合格","理论考否","考试性质"}
Dim Cols2() As String = {"工作单位","县公司","姓名","性别","身份证号码","文化程度","鉴定等级","申报鉴定工种","鉴定批次","申报性质","备注","照片","是否合格","理论考否","考试性质"}
For Each dr1 As DataRow In DataTables("审核合格表").Select("[考试性质] = \'补考实操\' and [考试性质] = \'补考潜能\' and [考试性质] = \'补考两项\'")
    Dim dr2 As DataRow = DataTables("实操潜能表").Find("身份证号码 = \'" & dr1("身份证号码") & "\'")
    If dr2 Is Nothing Then
        dr2 = DataTables("实操潜能表").AddNew
    End If
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
Next

这段代码错在哪?求帮助!

不报错,点击按钮只能实现“考试性质”=‘补考实操’的人员全部填充过去,另外两种就过不去。


--  作者:Bin
--  发布时间:2015/2/2 8:29:00
--  
DataTables("审核合格表").Select("[考试性质] = \'补考实操\' or [考试性质] = \'补考潜能\' or [考试性质] = \'补考两项\'")
--  作者:lisheng7177
--  发布时间:2015/2/2 9:19:00
--  
图片点击可在新窗口打开查看谢谢Bin版!我昨天也写了这样的格式代码,不过在单双引号方面没处理好。