问题描述
大家好,我在更改记录时遇到更新字段的问题。我有一个主窗体和一个子窗体。主要形式具有总计,存款和到期。文本框。子表单包含项目和项目总数(项目数*价格)。
我目前有一个更新查询,用于计算项目总计。在表格中,我有一个OnUpdate事件,它取(订单的总价格) - (任何存款)=到期。
这一切都很好,接受事实如果您使用不同的订单号进入记录,则总金额,存款金额和到期金额与之前的记录保持一致。
从我的理解不是很好存储表中的计算字段,所以我试图在表单中执行此操作。
当我更改记录时,如何让字段自动更新?
谢谢,
Scotter
Hi everyone, I''m having an issue with getting my fields to update when i change records. I have a main form and a subform. The main form has "total", "deposit", and "due" text boxes. The subform has the items, and the item total(# of items*price).
I currently have an update query that calculates the Item total. And in the form I have an OnUpdate event that takes the (Total price for the order) - (any deposit) = to ammount due.
This all works great, accept for the fact if you go to a record with a different order number the total, deposit, and due fields remain the same as they were with the previous record.
From what I understand its not good to store calculated fields within tables so I''m trying to do this within the form.
How can I get the fields to update automatically when i change records?
Thanks,
Scotter
推荐答案
这篇关于自动更新字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!