更新表单的问题 [英] Problem with updting forms

查看:52
本文介绍了更新表单的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这个问题。

我向我的客户销售单品。我向每位客户报价的价格必然会在很长一段时间内保持不变。出于这个原因决定添加?价格?作为表TblCustomers的字段之一。

我有另一个表,TblSalesDetails,其中包含字段Date,QuantitySold,SaleAmount。

我创建了表单F_SalesDatails,基于客户,控件价格?在主窗体上和一个子窗体,SF_SalesDatails,显示相同的TblSalesDetails字段。

现在我的问题。当我将数据放在SF_SalesDetails的Date和QuantitySold字段中时,我需要自动计算控件SaleAmount。不幸的是,如果我改变TblCustomers的价格,所有以前的SF_SalesDetails记录都会以新价格重新计算,这样我就无法以不同的价格跟踪之前的交易。

如何解决这个问题?希望有人可以提供帮助。

I am getting stuck with this problem.
I ?m selling a single product to my customers. The price I quote to each customer, is bound to remain the same for very long periods. For this reason a decided to add ?price? as one of the fields of the table TblCustomers.
I have another table, TblSalesDetails, containing, among the others, the fields Date, QuantitySold, SaleAmount.
I have created a form F_SalesDatails, based on customers, with the control ?price? on the main form and with a subform, SF_SalesDatails, showing the same fields of TblSalesDetails.
Now my problem. When I put data in the fields Date and QuantitySold of SF_SalesDetails I need the control SaleAmount to be automatically calculated. Unfortunately if I change the price in TblCustomers all previous records of SF_SalesDetails are recalculated at the new price so that I am unable to keep track of the previous transactions at different prices.
How can I get around this problem? Hope someone can help.

推荐答案

我想你已经回答了自己的问题。

你需要在你的详细信息中保留价格表。通过各种方式设置客户表中价格的默认值。


Phil
I think you''ve answered your own problem.
You need to hold the price in your details table. By all means set the default value from the price in your customer table.

Phil


非常感谢您帮助Phil。

您的意思是我需要在我的详细信息表中添加字段价格并为客户表中的价格设置一个默认值吗?如果是这种情况,所有客户的价格都是相同的,而每个客户都有不同的价格,虽然是长期价格。

也许我误解了你的意思。你能否更具体一点?

David
Thank you very much for helping Phil.
Do you mean I need to add a field “price” in my Details Table and set a default value for it drawn from the price in Customers Table? If this is the case, the price would be the same for all customers while each of them has a different price, though a “long term” one.
Perhaps I am misunderstanding what you mean. Can you please be more specific?
David


正是我的意思。我假设每个客户的价格不同。这些价格会随着时间的推移而变化,但是当您创建另一个销售记录时,销售记录中的默认价格将是该客户的最新(且唯一)价格。


因此,假设销售记录中的默认价格未被覆盖,那将显示创建销售记录日期客户表中的价格。


如果是默认值价格被过度使用,那就是商品的售价。


如果销售价格被覆盖,则表格中的价格可能会超出客户表中的价格要改变


Phil
Precisely what I mean. I assume that there is a different price for each Customer. Those prices will change over the course of time, but when you create another sales record, the default price in the sales record will be the latest (and only) price for that customer.

So assuming that the default price in the sales record is not over-ridden, that will show what price was in the customer table at the date the sales record was created.

If the default price is over-ridden then that is the price the goods were sold at.

A warning should be issued if the sales price is over-ridden that the price in the Customer table may need to be changed

Phil


这篇关于更新表单的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆