链接两个以上的表 [英] Linking more than two tables

查看:83
本文介绍了链接两个以上的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用关系链接两个以上的桌子。


使用参考插入我可以连接两个表,这样点击一个小+我可以打开一个另一个用于各种条目。


但我想添加更多,以便当我点击+时,它会打开下面两行或更多行,其他表格中的腐蚀值条目。


所有表都有唯一的编号和名称字段作为主键的选项。在我成功链接的两个我已经使用名称作为主要名称并在链接表中输入数字我第一次为每个条目打开它。


我正在尝试甚至可能。我已经链接到的两个表具有相同数量的数字和名称字段条目,但是我希望链接的表格只会填充表格中某些字段的内容。


我基本上希望这样做,这样我就可以看到第一张表内同一条目的其他表中的值...


help ...如果可能的话

I''m trying to use relationships to link more than two tables.

Using referencial intrgerity I can connect two tables so that by clicking a small + I can open one inside the other for the various entries.

But I would like to add more so that when I click the + it opens tow or more lines below with the corrosping values entries in the other tables.

All tables have a unique number and Name field as options for Primary Key. In my successful linking of two I''ve used name as primary and entered number in the linked tables first time I open it for each entry.

Is what I''m trying even possible. The two table I''ve linked sofar have the same number of entries of number and name fields, but the ones I''m hoping to link will only have content of certain fields in their tables are filled in.

I''m basically hoping to make it so that I can see the values lsited in other tables for the same entry inside the first table...

help...if possible

推荐答案

为什么使用[+]而不将其转换为主表的主表单和每个依赖表的子表单? br />

Nic; o)
Why using the [+] and not transform this into a main form for the main table and a subform for each dependent table ?

Nic;o)


代达罗斯:

我正在尝试使用关系链接两个以上的桌子。


但是我想添加更多以便当我点击+它打开两个或者更多行以及其他表中的对应值条目。
Daedalus:
I''m trying to use relationships to link more than two tables.

But I would like to add more so that when I click the + it opens tow or more lines below with the correspond values entries in the other tables.



不确定我是否已经按照这个...

你想在表格中有一连串相关记录吗?


现在,这可能不是处理您所追求的情况的最佳方式。通常情况下,我不会让用户甚至看到原始表格,并且正如另一个人所建议的那样,首选使用主表格和子表格。


有了这样的说法,你是不是喜欢用什么东西?像这样?

tbl_one

Not sure that I''ve followed this...
You would like to have a cascade of related records in the table?

Now, this may not be the best way to handle the situation you''re after. Normally, I don''t let users even see the raw tables and as suggested by another the use of a main form and subform is prefered.

With that said, are you after something like this?
tbl_one

(+)tbl_one记录一个与某些fk相关的tbl_two
(+)tbl_one Record one related on some fk to tbl_two
(+)来自tbl_two的相关信息,其中一行或多行来自tbl_two与当前记录相关在tbl_one
(+)the related information from tbl_two with one or more rows from tbl_two related to the current record in tbl_one
(+)来自tbl_three的一个或多个记录,与tbl_two相关,因为它属于从tbl_one继承的tbl_two的子记录
(+)one or more records from tbl_three, related back to tbl_two as it pertains to the child record from tbl_two inherited from tbl_one

所以你得到的东西就像我有这里有四张桌子:

tbl_manf - (pk manf_id)

tbl_prd - (pk prd_id);(fk manf_id(1:m))

tbl_asst - (pk asst_id);(fk prd_id(1:m))

tbl_hst - (pk hst_id);(fk asst_id(1:m))

So you get something like I have here with four tables:
tbl_manf - (pk manf_id)
tbl_prd - (pk prd_id);(fk manf_id (1:m))
tbl_asst - (pk asst_id);(fk prd_id (1:m))
tbl_hst - (pk hst_id);(fk asst_id (1:m))

附图像
(105.1 KB,299 views)
Attached Images
(105.1 KB, 299 views)


是的猜猜我说得不好 - 我的不好。


使用Access 2007


数据库是给我帮助的e管理会员列表等社交俱乐部我是他的财务主管。


表会员。具有值#,名称(主键)以及各种联系信息详细信息,如邮件,地址,电话,生日,加入日期,请​​假日期,状态,会员类型,付款方式等。


表付款。每个月都有值#,名称(主键)和一个字段。


第三个表格将包含哪些类型的管理角色,哪些成员资格和类似。还将有#,姓名(主键)


第4个表将用于lsiting,已发送提醒已延迟付款并已发出罚款。还会有#,Name(主键)

我在DB中的主要工作窗口是表成员,因为我通常需要快速连续地多个条目或检查多个条目,所以表格当我需要根据特定原因查找某些东西时,显示一个单值很有用,但对于我平常的工作,我发现表格视图可以得到最好的结果。


我''已经创建了会员分发查询,付款清单报告和打印成员列表。和输入新成员的表格(包括通过号码搜索,我工作取得巨大成功)或单身会员付款。


每张表中的主键都是姓名(我可以轻松手动输入#以使表匹配,就像我在链接两个表时需要做的那样)。所有字段都是文本,数字或地址 - 有一些是查找 - 没什么特别的。


我希望能让我拥有......最好的词是问题"下拉"通过[+]在表会员中的某个人以下,以便我获得表格付款。管理CHINESE。以及下面3行显示的那个人的罚款/提醒表条目...


所以:


主表成员
付款

管理

罚款/提醒。


1表我可以点击查看价值观3个直接相关的表。


这样我可以迅速关闭一个人并继续更新下一个。


不确定我是不是希望是可能的,如果不是我可以在表单/子表单方法,但这将是一个后备选项。因为我在代码部门非常弱,所以很有用。


任何帮助都非常适合,即使jsut通知我,我所追求的是无可救药的复杂而且我应该放弃对于Form / subform来说......这样我就可以把这个想法付诸东流。
Yeah Guess I didn''t explan properly - my bad.

Using Access 2007

The DB is for me to help me manage membership listings and such for a social club I''m the treasurer of.

Tables Members. Has values #, name (Primary Key), and various contact info details like mail, adress, phone, birthday, join date, leave date, status, type of membership, payment method etc.

Table Payment. Has values #, Name(Primary Key) and one field for each month.

Third table will be one that will hold the info on what type of management role, what group of membership and the like. Will also have #, Name(primary Key)

4th Table will be for lsiting wether a reminder has been sent for late payment and wether a fine has been issued. Will also have #, Name(Primary Key)

MY main working window in the DB is the Table Members since I usually need to mnipulate or inspect multiple entries in quick succession, so a form that displays a singel value is good for when I need to look up something for a specific reason, but for my usual work I''ve found the table view gives best results.

I''ve created queries for membership distribution, reports for payment lists and membership lists for printing. And forms for entering new members (incl search via number, a big success for me to get working) or single member payments.

Primary Key in each Table will be Name (and I can easily manually enter the # to make the tables match like I need to do when linking two tables). All fields will be either text, number or adress - with a few that are lookup - nothing fancy.

What I was hoping was to enable me to have..well best words is prob "dropdown" below a person in Table Members via the [+] so that I get tables Payments. Mangement. and the Fine/reminder Table entries for that person shown in 3 lines below...

So:

Main Table Members
Payments
Management
Fines/reminders.

1 Table wherein I can with a click see values from 3 directly related tables.

That way I can rapidly close one person and move on to updat the next one.

Not sure waht I wish for is possible, if not I can have a go at the form/subform method but that would really be a fallback option. Espeically since I''m very weak in the code department.

Any help is greatly appriciated, even if jsut informing me that what I''m after is hopelessly complicated and I should abandon it for Form/subform...that way I can put the idea to rest.


这篇关于链接两个以上的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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