Dim da As Table = Tables("机台人员")
For h As Integer = 0 To da.Rows.count - 1
Dim u1 As Row = da.Rows(h)
Dim dmm = Format(u1("日期"), "yyyyMM")
Dim dd = "出勤" & CInt(Format(u1("日期"), "dd")) & "号"
Dim fdr As DataRow = DataTables("考勤核算").SQLfind("月份 = '" & dmm & "' and 工号 = '" & u1("工号") & "'")
If fdr IsNot Nothing Then
fdr(dd) = "计件" & u1 ("工资") & "元"
End If
Next
Tables("考勤核算").Save()
这个值修改不了,发挥不出作用,fdr(dd) = "计件" & u1 ("工资") & "元"
fdr(dd) "计件" & u1 ("工资") & "元"
Dim dmm = Format(u1("日期"), "yyyyMM")
Dim dd = "出勤" & CInt(Format(u1("日期"), "dd")) & "号"
这几个值都是能生成并查找显示出来,就是不能把表fdr(dd)指定的单元格的值,替代为"计件" & u1 ("工资") & "元"
SQLfind查询后的行是独立的行,和主表没有关系的,必须单独保存
If fdr IsNot Nothing Then
fdr(dd) = "计件" & u1 ("工资") & "元"
fdr.save
End If