亲子数据库(MS ACCESS)

发布于 2024-08-04 22:42:15 字数 469 浏览 7 评论 0原文

我正在尝试为医院项目建立一个数据库。我有两个以父子关系相关的表。我有一个用于添加新记录(还没有父记录的记录)的表单,并且我想构建允许我查看父记录的所有“子记录”并允许我编辑它们的表单。我希望此表单允许我以只能搜索一条父记录的方式搜索记录 回来了。

请参阅我的数据库 http://rapidshare.com/files/283207434/IC.mdb .html

- 检查名为“TEST”的表单。我无法让它工作,以便主表单控件可以充当过滤器来显示子表单中的子记录。我去过很多很多论坛,而我缺乏知识使得论坛标签几乎毫无用处。朋友告诉我,这个服务很快!如果有人愿意通过即时通讯或其他方式帮助这个可怜的灵魂,那就太好了!但我也愿意在这里与您合作:)希望很快能收到您的来信!

-谢谢 佐尔克米德

I'm trying to build a database for a hospital program. I have two tables that are related in a parent-child relationship. I have a form to add new records (records that dont already have a parent record) and I want to build forms that allow me to view all of a parent record's "children" as well as allowing me to edit them. I want this form to allow me to search for a record in such a way that only one parent record can be
returned.

Please see my database at http://rapidshare.com/files/283207434/IC.mdb.html

-check the form called "TEST". I can't get it to work so that the main form controls can act as filters to display the child records in the subform. I have been to many many forums and my lack of knowledge makes forum tag almost useless. A friend told me that this service was fast! If there is someone out there willing to help this poor soul over IM or something, that would be terrific! But I'm willing to work with you here too :) Hope to hear from you soon!!!

-Thanks
Zorkmid

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时间海 2024-08-11 22:42:15

实际上没有涉及任何代码。根据其他论坛告诉我的,我不需要任何代码。以下是一位 MS MVP 的说法。我已经尝试了所有这些,但我无法查明错误。

根据主(父)表构建主表单。不要使用 sql 连接

<块引用>

引入子记录。只需在此主表上构建一个表单即可。

要使用“跳转”形式移动到选定的名称,只需使用组合框
向导并放入组合框(按照说明操作)。

现在,根据子表创建一个连续表单。同样,您可以构建
此表单并基于子表。再次强调,不要使用 sql join,也不要
尝试引入父表的任何字段或部分。

假设您也正确设置了两者之间的关系
关系窗口中的表。

现在,在设计中调出您的“主”表单(基于父表的表单)
模式。确保向导已启用,然后放入子表单控件并
按照向导说明进行操作(根据孩子选择正确的形式
桌子)。 Ms-access 将为您进行设置。

最终结果是,如果您在主窗体中导航,子窗体(子窗体)
form)将跟随并显示正确的子记录。并且,代替
使用导航,如果您使用向导创建的组合框,那么
当父窗体再次移动到记录时,子窗体将显示
正确的记录。

无需编写一行代码即可完成上述所有操作。

There isn't really any code involved. From what other forums have told me, I don't need any code. Here's what a MS MVP said. I've tried all that, and I cant pinpoint the errior.

Build you main form based on the main (parent) table. DO NOT use a sql join

to bring in child records. Simply build a form on this main table.

To have the form "jump" for move to selected name simply use the combo box
wizard and drop in a combo box (follow the instructions).

Now, create a continues form based on the child table. Again, you can build
this form and base it on the child table. Again, don't use a sql join, nor
try to bring in any fields or parts of the parent table.

It is assumed you also correctly setup the relationship between the two
tables in the relationship window.

Now, bring up your "main" form (the one based on the parent table) in design
mode. Make sure wizard are enabled, and then drop in a sub-form control and
follow the wizard instructions (choose the correct form based on the child
table). Ms-access will setup this for you.

The end result is that if you navigate in the main form, the child form (sub
form) will follow and display the correct child records. and, in place of
using the navigation, if you use the combo box created by the wizard, then
again when the parent form move to a record, the child form will display the
correct records.

All of the above can be done without you having to write one line of code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文