如何使用Unbound Form中的数据填充表字段? [英] how to fill table field with data from Unbound Form?

查看:86
本文介绍了如何使用Unbound Form中的数据填充表字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我一直在Access中创建一个生产和制造数据库,该数据库有一个表格,用于记录发票文件,并附有一个子表单,您可以选择要购买的文章。


<然后我创建了一个文本框来计算子表单中的总数。


之后在主表单中我用这个控件源创建了一个文本框:


= [ArticlesSub]。[Form]![TotalSubForm]


所以我在主窗体中有数据,但我找不到一种方法让表格将数据存入名为"TOTAL"的字段从主窗体所基于的表格开始。


如何获取表格将该数据存储到正确的字段中(表格中的总数填入"reg1"中的总字段中)表)?




解决方案

为什么要存储它,何时可以计算它?只需使用查询即可。


否则您可以使用数据宏执行此操作:
使用Access 2010应用程序中的数据宏将逻辑附加到数据

so I have been making a production and manufacturing database in Access, which has a table that registers invoice documents and has attached a subform where you pick the articles you are buying.

then I created a text box that calculates the total in the subform.

afterwards in the main form I created a textbox with this control source:

=[ArticlesSub].[Form]![TotalSubForm]

so I have the data in the main form, but I cannot find a way to make the form store that data into the field named "TOTAL" from the table which the main form is based.

how do I get the form to store that data into the proper field (total on the form into the total field in the "reg1" table)?


解决方案

Why do you want to store it, when you can calculated it always? Just use a query to do this.

Otherwise you can use a data macro to do this: Attaching Logic to Data Using Data Macros in Access 2010 Applications


这篇关于如何使用Unbound Form中的数据填充表字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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