关于访问中的脏功能 [英] on dirty function in access

查看:46
本文介绍了关于访问中的脏功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解决这个问题....


如何在访问脏功能上使用


我用这个2功能。 ..


我有2个文本框用于用户密钥..这是QtyReq和QtyIssued


QtyReq是供用户请求多少项他们想要......那并不涉及任何计算......而且对于涉及计算的QtyIssued。例如,主要库存为10 ...然后用户将QtyReq 20和QtyIssued设置为10 ....然后用户将保存它...并且主要库存将在用户将10放入数量已发布后自动扣除...现在股票变成0 ......然后问题来了..当用户想要更新而没有看到股票有没有...他们打开列表作为待处理的表格...这是QtyReq = 20 QtyIssued = 10和仍然得到Balance = 10 ....所以用户将打开并将QtyIssued更改为20 ....这将转到下面的编码...


Who can solve this problem....

how to use on dirty function in access

I use this 2 function...

I have 2 textbox for user key in..which is QtyReq and QtyIssued

QtyReq is for user to request how many item they want...that''s didn''t involve any calculation...and for QtyIssued that involve calculation. For example the main stock is 10...then user will put QtyReq 20 and QtyIssued to 10....then user will save it...and the main stock will auto deduct after user put 10 in Qty Issued...Now the stock become 0...Then the problem comes..when user want to update back without seeing the stock have or not...they open back the form that list as pending...which is QtyReq = 20 QtyIssued=10 and still got Balance=10....So user will open and change the QtyIssued as 20....that goes to the below coding...


展开 | 选择 | Wrap | 行号
解决方案

我建​​议在保存记录之前不应更新任何内容。对价值输入的处理是不合适的,会给您带来困难。避免这些困难的方法是正确设计过程 - 也就是说在保存更改之前不应用任何更新。我希望这是有道理的。
I would suggest that nothing should be updated until the record is saved. Processing on the entry of the value is not appropriate and will cause you difficulties. The way to avoid those difficulties is to design the process properly - which is to say not to apply any updates until changes are saved. I hope that makes sense.


感谢@NeoPa回复...我让它更新,因为有时用户需要的不在库存中......为什么我为用户提供QtyIssued键入他们已经在商店和余额中的项目将显示。之后,如果项目已经重新进入,那么用户将打开这个表格进行键入,直到QtyReq
Thanks @NeoPa for replying...I make it updated because sometimes what user required are not in the stock...that why I make QtyIssued for user to key in what item they already take in the store and balance will be show. Later, if the item already restock user will open back this form to key in until the QtyReq


每隔一段时间,当看起来问题非常复杂时,我发现对我而言更好的逻辑/方法来解决手头的问题。


在您的情况下,工作流程看起来像:


用户请求30项目x

项目x有10个库存

用户被发出10个项目x

库存物品x归零

任何后续的项目X请求都需要被拒绝。


因此,作为我正在思考的一个例子,可能是一个不同/更简单的方法:

记录
Every so often, when it seems that the problem is very complex I find that for me there might be better logic/method to solve the problem at hand.

In your case the workflow appears to look like:

User requests 30 of item x
Item x has 10 in stock
User is issued 10 of Item x
Item x in stock is zeroed
Any subsequent requests for Item X need to be denied.

So as an example of what I''m thinking might be a different/easier method would be:
Records
展开 | 选择 | Wrap | 行号


这篇关于关于访问中的脏功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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