ms访问中的绑定和未绑定控件 [英] bound and unbound controls in ms access

查看:149
本文介绍了ms访问中的绑定和未绑定控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MS Access中的绑定和未绑定控件有什么区别?
他们有什么区别?而在设计视图中,在MS Access表单上,我们如何判断一个表单是否绑定?

解决方案

绑定元素直接链接到相关表格,当您修改表单中的任何数据时,您的更改将立即写入表格。这可能会导致人们质疑为什么关闭表单时会保存更改?那么这是你的绑定行为,为了防止任何更新你必须使用 BeforeUpdate 之类的过程来取消。绑定控件很容易识别,因为它们将在设计视图中包含表中的字段名称。



不绑定表单恰恰相反,他们不直接与数据库字段绑定,并涉及更多的编码工作,以便在普通视图中初始填充它们。但是,如果没有自己编写的过程,这些不会自动更改您的表。 保存按钮。这允许更多的控制,而且还涉及更多的工作和对VBA编码的良好理解。未绑定的控件也很容易识别,因为它们将包含设计视图中未绑定的字。



注意:还有更多的可以说,但这是一个基本的概述。 / p>

What is the difference between bound and unbound controls in MS Access? How do they differ? And when on an MS Access Form in design view, how can we tell if a form is bound or not?

解决方案

Bound elements are linked directly back to the relevant tables, and when you amend any data within form's, your changes are immediately written to the tables. This can often lead to people questioning why "when I close a form does it save the changes?" Well that's bound behaviour for you, and to prevent any updates you must use procedures such as BeforeUpdate to cancel if necessary. Bound controls are easy to identify as they will contain the field names from the table in design view.

Unbound forms are quite the opposite, they are not tied directly to database fields and involve more coding work in order to initially populate them in normal view. However these will not automatically make changes to your tables without a custom procedure you have written e.g. a Save button. This allows a little more control, but also involves more work and good understanding of VBA coding. Unbound controls are also easy to identify as they will contain the word unbound in design view.

Note: There is much more can be said but this is a basic outline.

这篇关于ms访问中的绑定和未绑定控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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