此代码编写在哪个位置啊?
代码写在表的DataColchanged事件
If e.DataCol.Name = "金额" Then
If Forms("窗口1").Opened Then
Forms("窗口1").Controls("Label1").Text = e.DataTable.Compute("sum(金额)")
End If