从数据输入会话中“批处理”记录的最佳方法是什么? [英] What's the best method to 'batch process' records from a data entry session?

查看:87
本文介绍了从数据输入会话中“批处理”记录的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个系统,包括购买表格和购买详情子表格,一对多关系等。


在将它们提交到光盘之前,保持输入到子窗体中的记录的最佳方法是什么?客户需要能够在输入的数据保存到表格之前检查输入的数据。


我想过make table查询并且一直在试验记录集克隆,但是我当然不是DAO / ADO编程的专家。但是,如果我知道最佳/首选方法,那么我将缩小我需要学习的新内容。


我需要保存的字段叫做PurchaseDetailsID,PurchaseID,ProductID, UnitCost和Quantity - PurchaseDetails表的字段。通常每次输入的数据不超过6行。



非常感谢您的时间,


RPE 。

Hi Guys,

I have a system that includes a Purchase form and a Purchase Details subform, one to many relationship etc.

What is the best way to ''hold'' the records entered into the subform, before committing them to disc. The customer needs to be able to check the entered data before it has been saved in the table.

I''ve thought of make table queries and have been experimenting with recordset clones, but am certainly not an expert with DAO/ADO programming. However, if i knew the best/preferred method then I would narrow down how much new I have to learn.

The fields I need to save are called, PurchaseDetailsID, PurchaseID, ProductID, UnitCost and Quantity - the fields of the PurchaseDetails table. Usually there are not more than 6 rows of such data entered each time.


Many thanks for your time,

RPE.

推荐答案

据我所知,您不能使用涵盖主窗体和子窗体的事务。因此,唯一可行的解​​决方案是使用具有临时值的表,然后将子窗体记录的保存/更新绑定到主窗体导航中(即,当主窗体导航到另一个记录或关闭时,更新活动表中的子记录)
You cannot use transactions covering both the main form and the subform as far as I know. Thus the only viable solution is to use a table with temporary values, and then tie the saving/updating of subform records into the main forms navigation (I.e. update child records in live table when main form navigates to another record, or closes)


BeginTrans _blank>上下文相关帮助。在使用之前必须先了解它,但它可以让你实现目标。


FYI:DBEngine.Workspaces(0).Name ==" #Default Workspace# "
Check out BeginTrans in the Context-Sensitive Help. It would have to be understood well before using, but it may allow you to achieve your aim.

FYI: DBEngine.Workspaces(0).Name == "#Default Workspace#"


感谢您的帮助SmileyCoder。


我认为临时表可能是一种方法,但发现它'笨重' 至多到目前为止。


我不能相信这个问题已经变得如此难以解决......但一般来说,当我在Access中遇到这样一个僵局之前,它只是意味着我已经从错误的基本面开始了!


再次感谢,


Stonward。
Thanks for your help SmileyCoder.

I figured that temporary tables would be a likely method, but have found it ''clunky'' at best so far.

I can''t believe this problem has become so difficult to solve...but generally when I have come across such an impasse in Access before, it simply means I have started with faulty fundamentals!

Thanks again,

Stonward.


这篇关于从数据输入会话中“批处理”记录的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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