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

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

问题描述

MS Access 中绑定和未绑定控件的区别是什么?它们有何不同?当在设计视图中的 MS Access 表单上时,我们如何判断表单是否已绑定?

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?

推荐答案

绑定 元素直接链接回相关表格,当您修改表单中的任何数据时,您的更改会立即写入桌子.这通常会导致人们质疑为什么当我关闭表单时,它会保存更改吗?"好吧,这对您来说是一种约束行为,为了防止任何更新,您必须使用诸如 BeforeUpdate 之类的程序在必要时取消.绑定控件很容易识别,因为它们将包含设计视图中表中的字段名称.

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.

未绑定 表单正好相反,它们不直接绑定到数据库字段并且需要更多的编码工作,以便最初在正常视图中填充它们.但是,如果没有您编写的自定义程序,这些不会自动更改您的表格,例如保存按钮.这允许更多的控制,但也涉及更多的工作和对 VBA 编码的良好理解.未绑定控件也很容易识别,因为它们将在设计视图中包含未绑定一词.

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 access 中的绑定和未绑定控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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