MS Access 2003-在表单上串联相同ID的字段类型 [英] MS Access 2003 - Concatenating Field Types of Same ID on a Form
问题描述
好吧,一个在工作的人有一个访问数据库,他用它来跟踪事物.他已经使用过这种表格,该表格已经查询了他的需求,并在表格上产生了结果,而这正是他所需要的.
Ok so a guy at work has a little access database he uses to keep track of things. He has this form that he uses that already queries what he needs and produces the results on a form and that is really all he needs.
一件事是,对于每条带有不同类型"作为标识符"字段(我称之为字段")的记录,他都有重复记录...这是一个示例:
One thing is that he has duplicates for every record that comes up with a different "Type" as a field "indentifier" (what I call it)...here is an example:
ID Name Price Type
1 Prodcut A $10 A1
1 Product A $10 A2
1 Product A $10 A3
2 Product B $12 A1
etc
自然应该发生这种情况,他想查看所有类型,但是由于最终它长了一英里,他问我是否有一种方法可以串联类型",因此将显示以下内容:
naturally this is supposed to occur and he wants to see all the types but given it ends up being a mile long, he asked me if there was a way to concatenate the "types" so the following would be displayed:
ID Name Price Type
1 Prodcut A $10 A1, A2, A3
1 Product B $12 A1, A2, A3
1 Product C $14 A1, A2, A3
2 Product D $7 A1, A2, A3
...在表格上.谁能帮我这个忙吗?谢谢!
...on the form. Can anyone please help me with this? Thanks!
推荐答案
我找到了一个示例(通过访问将多行中的列值连接到单列中
I found an example (here) that seems to be exactly what you are looking for:
Concatenate Column Values from Multiple Rows into a Single Column with Access
从上面的链接:
问题
想出一个有意义的标题 这篇文章是最难的部分.这 问题是我见过一对 时间在Access新闻组中,但是 没有具体的描述很难描述 例子.一则讯息 comp.databases.ms-访问几年 以前这样说:
Coming up with a meaningful title for this article was the hardest part. The issue is one that I have seen a couple times in the Access newsgroups, but it is hard to describe without a specific example. One post to comp.databases.ms-access some years ago put it this way:
我想在一个字段中合并来自多个记录的字段值.例如:
I would like to combine a field's values from multiple records in a single field. For example:
Last First Code
------- --------- ----
Lesand Danny 1
Lesand Danny 2
Lesand Danny 3
Benedi Eric 7
Benedi Eric 14
结果应如下所示:
Result should look like:
Last First Codes
------- --------- -----
Lesand Danny 1,2,3
Benedi Eric 7,14
这篇关于MS Access 2003-在表单上串联相同ID的字段类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!