老师好,下面代码不能复制到三D宝子表。
If e.DataCol.Name = "号码"
If e.DataRow("号码") = "111" OrElse e.DataRow("号码") ="222" OrElse e.DataRow("号码") ="333" OrElse e.DataRow("号码") ="444" OrElse e.DataRow("号码") ="555" OrElse e.DataRow("号码") ="666" Then
'If e.DataCol.Name = "审核"
' If e.DataRow("审核") = True Then
Dim nma() As String = {"编号","开奖时间","期数","号码"} 'A表数据来源列
Dim nmb() As String = {"编号","开奖时间","期数","号码"} 'B表数据接收列
e.DataRow.save
Dim dr2 As DataRow = DataTables("三D宝子").Find("编号 = '" & e.DataRow("编号") & "'")
If dr2 Is Nothing Then
dr2 = DataTables("三D宝子").AddNew
End If
For i As Integer = 0 To nma.Length - 1
dr2(nmb(i)) = e.DataRow(nma(i))
Next
End If
End If
调试
If e.DataCol.Name = "号码"
msgbox(e.DataRow("号码"))
If e.DataRow("号码") = "111" OrElse e.DataRow("号码") ="222" OrElse e.DataRow("号码") ="333" OrElse e.DataRow("号码") ="444" OrElse e.DataRow("号码") ="555" OrElse e.DataRow("号码") ="666" Then
Dim nma() As String = {"编号","开奖时间","期数","号码"} 'A表数据来源列
Dim nmb() As String = {"编号","开奖时间","期数","号码"} 'B表数据接收列
e.DataRow.save
Dim dr2 As DataRow = DataTables("三D宝子").Find("编号 = '" & e.DataRow("编号") & "'")
If dr2 Is Nothing Then
dr2 = DataTables("三D宝子").AddNew
End If
msgbox(1)
For i As Integer = 0 To nma.Length - 1
dr2(nmb(i)) = e.DataRow(nma(i))
Next
End If
End If
老师,只显示对话框。
此主题相关图片如下:2024-03-01 17 26 54.jpg
提示框是用来调试的,这么长时间了还不懂得什么是调试吗?调试技巧:http://www.foxtable.com/webhelp/scr/1485.htm
这个提示说明当前号码不符合if条件要求,所以不会执行if里面的代码