例如:5173.41 / 6用计算机计算出的值:862.235
用代码计算出的值:862.16667(精度偏低,假如计算几百万,上千万,这误差不就太大了)
代码如下:
If e.DataCol.Name = "公司" Then
If e.NewValue Is Nothing Then
If e.DataRow.Isnull("费用") Then
Filter = "日期 = #" & e.DataRow("日期") & "# And 编码 = '" & e.DataRow("编码") & "'"
sm = DataTables("广告费").Compute("sum([消费])",Filter)
ct = DataTables("分摊").Compute("Count([编码])", Filter )
请老师解惑