PC Review


Reply
Thread Tools Rate Thread

concatenated list

 
 
=?Utf-8?B?SkxCMDZMQQ==?=
Guest
Posts: n/a
 
      5th Sep 2006
Hello again,

I went to http://www.mvps.org/access/modules/mdl0004.htm to learn about how
to concatenate lists. The problem is that I have no idea how to add it into
the query string. Where do I save it in Access? How and where do I pull it
up in a query? And does this code work if I want to concatenate an entire
list rather than one record?

I am not an advanced programmer and don't really understand VB. I just need
a little more handholding.

Any help would be appreciated.
 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      5th Sep 2006
The concatenation code below, works on a single field, and concatenates a
list of values in that field. I would be used, for instance to create a list
of last names that were workers on a project. You can use that code on a
query as a recordset, and output the values to a control, but you couldn't
use it in a query since it can't run for all rows in a single row.

To concatenate a single record in a query, you'd use something like:

Expr1: [Field1] & ", " & [Field2] & ", " & [Field3] & ", " & [Field4]

to do the same on a form, try somethin like:

= [Text1] & ", " & [Text2] & ", " & [Text3] & ", " & [Text4]
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"JLB06LA" <(E-Mail Removed)> wrote in message
news:553F4028-0038-4849-AA3A-(E-Mail Removed)...
> Hello again,
>
> I went to http://www.mvps.org/access/modules/mdl0004.htm to learn about
> how
> to concatenate lists. The problem is that I have no idea how to add it
> into
> the query string. Where do I save it in Access? How and where do I pull
> it
> up in a query? And does this code work if I want to concatenate an entire
> list rather than one record?
>
> I am not an advanced programmer and don't really understand VB. I just
> need
> a little more handholding.
>
> Any help would be appreciated.



 
Reply With Quote
 
=?Utf-8?B?SkxCMDZMQQ==?=
Guest
Posts: n/a
 
      5th Sep 2006
Thanks Arvin,

I should have provided an example, because I think the solution is a bit
more difficult, but hopefully I'm wrong. This is what I'm trying to do:

Record Number, Household, Individual
238, Smith Family, John Smith
238, Smith Family, Jane Smith
240, Bush Family, Joel Bush
240, Bush Family, Jared Bush

To…

Record Number, Household, Individual 1, Individual 2
238, Smith Family, John Smith, Jane Smith
240, Bush Family, Joel Bush, Jared Bush

Any guesses?

"Arvin Meyer [MVP]" wrote:

> The concatenation code below, works on a single field, and concatenates a
> list of values in that field. I would be used, for instance to create a list
> of last names that were workers on a project. You can use that code on a
> query as a recordset, and output the values to a control, but you couldn't
> use it in a query since it can't run for all rows in a single row.
>
> To concatenate a single record in a query, you'd use something like:
>
> Expr1: [Field1] & ", " & [Field2] & ", " & [Field3] & ", " & [Field4]
>
> to do the same on a form, try somethin like:
>
> = [Text1] & ", " & [Text2] & ", " & [Text3] & ", " & [Text4]
> --
> Arvin Meyer, MCP, MVP
> Free MS-Access downloads:
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "JLB06LA" <(E-Mail Removed)> wrote in message
> news:553F4028-0038-4849-AA3A-(E-Mail Removed)...
> > Hello again,
> >
> > I went to http://www.mvps.org/access/modules/mdl0004.htm to learn about
> > how
> > to concatenate lists. The problem is that I have no idea how to add it
> > into
> > the query string. Where do I save it in Access? How and where do I pull
> > it
> > up in a query? And does this code work if I want to concatenate an entire
> > list rather than one record?
> >
> > I am not an advanced programmer and don't really understand VB. I just
> > need
> > a little more handholding.
> >
> > Any help would be appreciated.

>
>
>

 
Reply With Quote
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      5th Sep 2006
First, I'm not sure I understand how you are using Record Number. Two
different records cannot have the same number. Is your Record Number
actually a HouseholdID?

Assuming that it is, you use the concatenation code on the "Individual"
field.
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"JLB06LA" <(E-Mail Removed)> wrote in message
news:F41E8649-6644-440D-818B-(E-Mail Removed)...
> Thanks Arvin,
>
> I should have provided an example, because I think the solution is a bit
> more difficult, but hopefully I'm wrong. This is what I'm trying to do:
>
> Record Number, Household, Individual
> 238, Smith Family, John Smith
> 238, Smith Family, Jane Smith
> 240, Bush Family, Joel Bush
> 240, Bush Family, Jared Bush
>
> To.
>
> Record Number, Household, Individual 1, Individual 2
> 238, Smith Family, John Smith, Jane Smith
> 240, Bush Family, Joel Bush, Jared Bush
>
> Any guesses?
>
> "Arvin Meyer [MVP]" wrote:
>
>> The concatenation code below, works on a single field, and concatenates a
>> list of values in that field. I would be used, for instance to create a
>> list
>> of last names that were workers on a project. You can use that code on a
>> query as a recordset, and output the values to a control, but you
>> couldn't
>> use it in a query since it can't run for all rows in a single row.
>>
>> To concatenate a single record in a query, you'd use something like:
>>
>> Expr1: [Field1] & ", " & [Field2] & ", " & [Field3] & ", " & [Field4]
>>
>> to do the same on a form, try somethin like:
>>
>> = [Text1] & ", " & [Text2] & ", " & [Text3] & ", " & [Text4]
>> --
>> Arvin Meyer, MCP, MVP
>> Free MS-Access downloads:
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>> "JLB06LA" <(E-Mail Removed)> wrote in message
>> news:553F4028-0038-4849-AA3A-(E-Mail Removed)...
>> > Hello again,
>> >
>> > I went to http://www.mvps.org/access/modules/mdl0004.htm to learn about
>> > how
>> > to concatenate lists. The problem is that I have no idea how to add it
>> > into
>> > the query string. Where do I save it in Access? How and where do I
>> > pull
>> > it
>> > up in a query? And does this code work if I want to concatenate an
>> > entire
>> > list rather than one record?
>> >
>> > I am not an advanced programmer and don't really understand VB. I just
>> > need
>> > a little more handholding.
>> >
>> > Any help would be appreciated.

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenated value validation against list WallyWallWhackr Microsoft Excel Worksheet Functions 7 12th Jul 2010 12:14 AM
concatenated list =?Utf-8?B?bWJw?= Microsoft Access 4 14th May 2007 09:39 AM
Trim() concatenated fields of list row source =?Utf-8?B?anN0ZWV2ZXM=?= Microsoft Access Forms 7 13th Aug 2006 04:36 PM
List Box results concatenated in text box =?Utf-8?B?Z2FiYQ==?= Microsoft Access Forms 0 13th Jul 2005 11:59 PM
Create Concatenated List with Incremental Values Vicki Microsoft Excel Programming 4 2nd Aug 2004 04:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:26 AM.