在子表单上创建绑定列表框以显示父表单中的相关记录 [英] On child form create bound list box to show related records from parent form

查看:56
本文介绍了在子表单上创建绑定列表框以显示父表单中的相关记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有两张桌子,多对多的关系造成很多问题。我的父母和子女表单通过联结表链接。我希望能够创建子表的只读版本,这样您就不必从父表中链接到它。


链接已经使用组合框创建了两个组合,您可以在其中选择哪些记录彼此相关。


我希望在子表单上有一个列表框或组合框,它显示从父表中链接到该记录的记录,从组合框中选取的内容结点形式。


在本质上,这意味着阅读儿童表格的人会知道记录所基于的名称,如果他们不想通过父母的形式来阅读它。


任何帮助都会很棒,

Leigh

Hi all,

I have two tables with a many-to-many relationship which is causing many problems. My parent and child forms are linked via a junction table. I want to make it possible to create a read-only version of the child table so that you don''t have to link to it from the parent table.

A form linking the two together has been created with a combobox where you can pick and choose which records relate to each other.

I''d like on the child form there to be a list box or combo box which shows the records from the parent table linked to that record from what is picked within the comboboxes of the "junction form".

In essense it would mean that people reading the child form would know which names the record is based on if they didn''t want to go via the parent form to read it.

Any help would be great,

Leigh

推荐答案

我在这里没有遵循你的逻辑......你是说你已经有一个父/子表格,并且你不希望用户能够编辑子表单中的相关记录吗?
I''m not following your logic here... are you saying that you already have a Parent/Child form and that you do not want users to be able to edit the related records in the child form?


对不起,这是我初学者访问显示的一面。当我说Child形成它根本不是那样的时候,那是因为它曾经是那样的。这是一个单独的形式。我将使用表格1和表格2进行解释。


表格1(基于表1)和表格2(基于表2)没有直接关联(他们曾经是这就是我使用那种语言的原因。两个表单之间的联结表(表3)将它们链接起来以创建多对多关系。我有一个表单(表单3),它基于使用所有3个表的查询。我使用表单3创建新记录,然后也出现在表单2中。表单3让我显示表1和表2之间链接的记录。我使用另一个表格(表格4),其中有父母(表1)/孩子(表2和表3)与子表单中的组合框的关系,允许我从表2中选择链接到表1的记录。所选的记录也显示在表3中。


如果您想查看表2中没有重复记录的记录,则无法查看表单3。然而,表格2仅显示表2中的记录(无重复)。


表格1,表格3和表格4共享表1中的字段,我们称之为标题。字段(数据类型文本)。我想要标题还将表格2(以及表2中的记录)显示为不可编辑的列表或组合,以便读者可以看到哪个标题。表格2中的记录与表格1相关。


我希望这更有意义,可以有办法做我想做的事。


Leigh
Sorry this is my beginner side of access showing. When I said Child form it''s not that at all, it''s because it used to be like that. It''s a separate form. I''ll explain using Form 1 and Form 2.

Form 1 (Based on Table 1) and Form 2 (Based on Table 2) are not directly linked (they used to be that''s why I used that language). A junction table (Table 3) between the two forms links them to create a many-to-many relationship. I have a form (Form 3) which is based on a query using all 3 tables. I use Form 3 to create new records which then also appear in Form 2. Form 3 lets me show the records linked between Table 1 and Table 2. I use yet another form (Form 4) which has a parent (Table 1)/child (Table 2 and 3) relationship with a combobox in the child form which allows me to choose the records from Table 2 that link to Table 1. The records chosen then also show in Form 3.

Form 3 cannot be looked at if you want to see the records from table 2 with no duplicate records. Form 2 however shows only the records from Table 2 (no duplicates).

Form 1, Form 3 and Form 4 share a field from table 1, lets call it, "Title" field (Datatype Text). I''d like "Title" to also show in Form 2 (as well as records from Table 2) as an uneditable list or combo so that readers can see which "Titles" the records in Form 2 are related to from Form 1.

I hope that makes more sense and there could be a way of doing what I want.

Leigh


所以你在表单2上使用组合框基本上就像一个过滤器,是/否?

我不是确定这是否正是你所追求的;但是,NeoPa在这里有一个非常好的表单过滤示例: http:// bytes.com/topic/access/insigh...filtering-form 无论如何,这些信息应该会让你走上正轨。

z
So you''d be using the combobox on form 2 basically like a filter, yes/no?
I''m not sure if this is exactly what you are after; however, NeoPa has a pretty good example of form filtering here:http://bytes.com/topic/access/insigh...filtering-form in anycase, the information should hopefully get you on the right track.
z


这篇关于在子表单上创建绑定列表框以显示父表单中的相关记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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