从多行到一个字符串的数据 [英] Data from multiple rows into one string

查看:72
本文介绍了从多行到一个字符串的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

非常非常基本的用户,所以请不要笑!

我需要进入一个文本框,来自同一领域的狗名但是在Access数据表的多行中:

例如

第1行,名称Jack

第2行名称Jill

排3名鲍勃


杰克和吉尔属于同一所有者(所有者的独特ID 273)鲍勃独立


我想要在一个文本字段中将属于一个人的所有狗的名字放入报告中

例如

唯一ID 273,狗名杰克& Jill


目前,我正在为每只狗准备一个单独的页面。

希望我已经解释清楚并提前感谢

Steve

Hi all
very very basic user here so please don''t laugh!
I need to get into one text box, dog names from the same field but in multiple rows in an Access data table:
e.g.
row 1, name Jack
row 2 name Jill
row 3 name Bob

Jack and Jill belong to the same owner (same unique ID 273 for owner) Bob is seperate

I want to put into a report all the dog''s names belonging to one person in one text field
e.g.
unique ID 273, dog name(s) Jack & Jill

At the moment, I am getting a seperate page for each dog.
Hope I have explained it clear enough and thanks in advance
Steve

推荐答案

不笑,只是指挥;到访问论坛


祝你好运。
Not laughing, merely directing; to the Access Forum.

Good luck.



大家好

非常非常基本的用户,所以请不要笑!

我需要进入一个文本框,来自相同字段但在Access数据表中多行的狗名:

例如

第1行,姓名杰克

排2名吉尔

排3名鲍勃


杰克和吉尔属于同一所有者(同一个唯一身份证) 273为所有者)Bob是单独的


我想在一个文本字段中将属于一个人的所有狗的名字放入报告中

例如

唯一ID 273,狗名杰克& Jill


目前,我正在为每只狗准备一个单独的页面。

希望我已经解释清楚并提前感谢

Steve
Hi all
very very basic user here so please don''t laugh!
I need to get into one text box, dog names from the same field but in multiple rows in an Access data table:
e.g.
row 1, name Jack
row 2 name Jill
row 3 name Bob

Jack and Jill belong to the same owner (same unique ID 273 for owner) Bob is seperate

I want to put into a report all the dog''s names belonging to one person in one text field
e.g.
unique ID 273, dog name(s) Jack & Jill

At the moment, I am getting a seperate page for each dog.
Hope I have explained it clear enough and thanks in advance
Steve

假设(必要时进行更改):

  1. 表名:tblDogs
  1. Table Name: tblDogs
  1. [Owner_ID] - INTEGER
  2. [狗名] - STRING

  • 查询名称:qryDogsAndOwners
  • 函数名称:fAppendDogNames
    1. 创建跟随标准代码模块中的函数
    1. Create the following Function in a Standard Code Module
    展开 | 选择 | Wrap | 行号




    我想知道你是否也可以帮助我 - 你发布的答案很容易理解(感谢有人soooooo这个新东西)但我有一个稍微不同的senario。我经营一个自愿的儿童露营组织,正在重做数据库。我希望能够在一个查询行中列出(因此我可以将其用于报告,表格等)每个露营者参加的营地列表以及他们是否是领导者,露营者,初级领导者等等。每个营地都用斜线隔开。而不是每个人都有一个整个页面占用了什么阵营。


    即PerKey,Combined Field(PerActivityCampGroupInfoXPerType& ActivityKey)

    23, CSCOct95 / LJCRJan96 / LLCOct99

    主要信息在一个表格中TableXPerActivityCampGroupInfo


    这有很多字段列出付款,颜色组他们在等等。但是需要的字段是:PerKey,ActivityKey,PerActivityCampGroupInfoXPerType


    每个都是数字 - 所以我需要获得PerActivityCampGroupInfoXPerType的相应文本值&安培; ActivityKey


    这些链接在两个表中


    Table =" TableActivity" (有很多领域 - 但是相关的领域是)

    FieldName = ActivityKey(密钥 - 自动编号)

    FieldName = ActivityShortName(这包含短营地或营地团聚名称即COct95 。


    Table =" TablePerType"(有很多字段 - 但相关的字段是)

    FieldName = PerTypeKey(Key - autonumber)

    FieldName = PerTypeShort(这包含短营地类型,即代替Camper Senior的CS。


    我希望我已经提供了足够的信息,我希望有一个简单的解决方案。在我们过去的数据库中,我们只使用了一个表格,因此我记录了露营者对一个领域的关注 - 但是转移到关系数据库已经抛出了这个曲线球,试图给每个团队的领导者提供每个露营者前几个营地的信息。 。


    我非常感谢你读这篇以及你能给予的任何帮助。


    祝福


    Thomas Felton
    Hi,

    I wonder if you could also help me - your posted answer was very easy to follow (Thanks from someone soooooo new to this stuff) but I have a slightly different senario. I run a voluntary children''s camping organisation and am redoing the database. I want to be able to list in one query row (so I can use this for reports, forms, etc) a list of the camps each camper has attended along with whether they were a leader, camper, junior leader, etc for that particular camp each separated by a slash. Instead of having a whole page taken up with what camp each person has come to.

    i.e. PerKey, Combined Field (PerActivityCampGroupInfoXPerType & ActivityKey)
    23, CSCOct95/LJCRJan96/LLCOct99

    The main information is in one table "TableXPerActivityCampGroupInfo"

    This has many fields listing payment, the colour group they were in, etc. However the fields needed for this: PerKey, ActivityKey, PerActivityCampGroupInfoXPerType

    Each of these are numbers - so therefore I would need to get the corresponding text value for the PerActivityCampGroupInfoXPerType & ActivityKey

    These are linked in two tables

    Table ="TableActivity" (There are many fields - but relating ones are)
    FieldName = ActivityKey (Key - autonumber)
    FieldName= ActivityShortName (This contains the short camp or camp reunion name i.e. COct95.

    Table ="TablePerType" (There are many fields - but relating ones are)
    FieldName = PerTypeKey (Key - autonumber)
    FieldName= PerTypeShort (This contains the short camper type i.e. instead of Camper Senior its CS.

    I hope I''ve given enough information and I hope there is an easy solution. In our past database we just used one table and so I recorded campers attendence inone field - but moving to a relational database has thrown this curveball in trying to give the leaders for each team information on how many previous camps each camper has been to.

    I really appreciate you reading this and any help you could give.

    Blessings

    Thomas Felton


    这篇关于从多行到一个字符串的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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