是这段代码? If e.DataCol.Name = "导到每片" Then '如果是已结帐列的内容变动 If e.NewValue = True Then '而且变动后的值是True(已勾选) for i as integer = 0 to tables("炉次.片号").count-1 if i < 9 tables("炉次.片号")(i,"炉次片号") = tables("炉次.片号")(i,"炉次编号") & "0" & i+1 else tables("炉次.片号")(i,"炉次片号") = tables("炉次.片号")(i,"炉次编号") & i+1 end if next e.DataRow.Locked = True '那么锁定此行 End If End If