老师,2楼的代码在控制从表里直接录入数据的时候管用,我还有一个表是用代码录入数据的,代码在按钮的CLICK中,就不行了。我改造了一下代码,提示第一行代码错误。请您指导。
'-----------------------判读重复----------------------------
If e.Col.Name = "D5_大班" AndAlso e.Row.isnull("D5_休班") = False Then
Messagebox.Show("提示:已考休班!","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
'------------------批量填充----------------------
Dim t As Table = Tables("当月考勤表2")
For i As Integer = t.TopRow To t.BottomRow
For j As Integer = t.LeftCol To t.RightCol
If t.Rows(i).IsNull(t.Cols(j).Name) Then
t.Value(i,j) = "0.5"
End If
Next
Next
End If