你datacolchanged事件有代码影响了吧?
http://www.foxtable.com/webhelp/scr/1522.htm
Dim Filter As String
Filter = ""
DataTables("工资库").LoadFilter = Filter
DataTables("工资库").Load()
Dim fxny As Date = DataTables("工资库").dataRows(DataTables("工资库").dataRows.Count - 1)("发薪年月")
Dim newfxny As Date = fxny.AddMonths(1)
Dim Result As DialogResult
Result =messagebox.show("是否批量生成与上月相同的" & newfxny & "月工资?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
systemready = False
For Each dr1 As DataRow In DataTables("工资库").Select("发薪年月 = '" & fxny & "'","岗位等级")
Dim dr2 As DataRow = DataTables("工资库").AddNew()
dr2("职工编号") = dr1("职工编号")
dr2("人员类别") = dr1("人员类别")
dr2("发薪年月") = newfxny
dr2("教贴") = dr1("教贴")
dr2("独保") = dr1("独保")
dr2("粮贴") = dr1("粮贴")
dr2("地方补贴") = dr1("地方补贴")
dr2("乡镇补贴") = dr1("乡镇补贴")
dr2("退休费") = dr1("退休费")
dr2("退休补贴") = dr1("退休补贴")
dr2("生活补助") = dr1("生活补助")
dr2("住房积金") = dr1("住房积金")
dr2("养老保险") = dr1("养老保险")
dr2("职业年金") = dr1("职业年金")
dr2("医疗保险") = dr1("医疗保险")
dr2("失业保险") = dr1("失业保险")
dr2("岗位等级") = dr1("岗位等级")
dr2("薪级等级") = dr1("薪级等级")
Next
systemready = True
DataTables("工资库").save()
End If