将销售订单输入与当前库存清单进行比较 [英] Compare sales order input with current on hand inventory

查看:69
本文介绍了将销售订单输入与当前库存清单进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在销售订单表单中输入一个值,该表格依次验证库存表中的数量。我们的想法是不允许在表格中输入大于现有水平的数量。目前,我有一个表单,在库存表中查找项目,然后输入数量。这些存储在单独的表中。这一切都在Access 2010中完成。

I want to be able to enter a value in the sales order form that in turn verifies the quantity in the inventory table. The idea is to not allow a quantity greater than the on hand level to be entered in the form. Currently I have a form that looks up the item in the inventory table and then quantity is entered. These are stored in a separate table. This is all done in Access 2010.

推荐答案

Russell,


您的表名是什么以及如何存储数据?


简单的答案是输入数量后,查找数量(以查找项目的方式类似)并验证数量。
<但是,
但是,我们不知道你是如何构建表格的,也不知道你的控件名称,所以我们不能给出具体细节。
Russell,

What are your table names and how is the data stored?

The simple answer is that after the quantity is entered, look up the quantity (in a similar manner that you look up the item) and verify the quantity.

however, we don''t know how youare tables are build, nor the names of your controls, so we can''t give specifics are this point.


请显示您的代码/工作。

如何在VBA中执行此操作的基础是使用before_update事件以及域查找或记录集来查找数据库中的项目,当前库存计数,并将计数与用户输入进行比较。

如果有效,请允许输入,如果无效则使用cancelevent将消息与消息框一起回滚。


这里的细节是我们不知道你的桌子结构和哟的设计你的形式。就个人而言,我会设计表单和底层记录集,以便在选择项目时显示可用的库存,编码更容易实现。
Please show your code/work.
The basics of how I would do this in VBA would be to use the before_update event and either a domain lookup or a recordset to find the item in you database, the current inventory count, and compare the count against user entry.
If valid, allow the entry, if invalid use the cancelevent to roll things back along with a message box.

The details here are that we do not know your table structure nor the design of your form. Personally, I would design the form and underlying recordset so that when the item was selected the available inventory would be displayed and the coding would be even easier to accomplish.


@twinnyfo


库存保存在名为[icitem]的链接表中,表单称为TktDetailsForm,表单将输入发布到表[TktDetails]。这个想法是让用户在表格中告知他们超过了[icitem]中的数量。数量的表格和表格都是数字控件(文本框)。


我希望我正确解释这一点,并提供了您所需要的。我只是需要它在输入时通知。表中的数量是否有简单的比较输入?
@twinnyfo
The inventory is kept in a linked table called [icitem] the form is called TktDetailsForm and the form posts the input to table [TktDetails]. The idea is to have the user told at point of entry in the form that they are over the quantity amount in [icitem]. The Table and Form for quantity are both number controls (textbox).

I hope I am explaining this correctly and have provided what you need. I just need it to notify at the time it is entered. Isn''t there a simple compare input to quantity in table?


这篇关于将销售订单输入与当前库存清单进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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