1表2表-MS ACCESS [英] 1 form 2 tables - MS ACCESS

查看:59
本文介绍了1表2表-MS ACCESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以设置1个表格来填充2个表?但是我希望对第二张表的任何后续更改都可以通过另一种形式完成.

Is there a way to set up 1 form to populate 2 tables? But I would like any subsequent changes to the second table to be completed via another form.

这可能吗?

推荐答案

如果表相互关联,请设置两者之间的关系(单击工具",然后在A2003中单击关系"),并将关系设置为强制"参照完整性.

If the tables are related to each other, set up a Relationship between the two (click on Tools, and then Relationships in A2003) and set the relationship to Enforce Referrential Integrity.

如果表不相关,那么您将必须使用查询或编写一些VBA代码来填充两个表,并通过与表单相关的事件运行它们(OnClick for a button,如果需要查询,则为OnLostFocus/当用户离开特定的文本框时,VBA会自动运行.

If the tables are unrelated, then you will have to use a query or write some VBA code to populate both tables, and run them through a form-related event (OnClick for a button, or OnLostFocus if you want the query/VBA to run automatically when the user moves off a specific textbox).

这篇关于1表2表-MS ACCESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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