how query multiple fields into one field?


G

Guest

Thanks for any help.
I have a query and I would like to add to it a field that concatenates
fields from records it groups.
So the query is like:

Field: field1, field2, [table1.field3]*3/2
Table: table1, table1,
Total: Group By, Sum, Where
Sort:
Show:
Criteria:,,>=[table2].[field1] And <[table2].[field2]
or:

So this query groups and sums based on a conditional, but I would like to
add a field which takes all of the data of that field of records it groups
and puts in a field.

So for example here's table1:
field1, field2, field3,field4
1998, 53.2,1.5,101A
1998, 25.6,1.6,123G
1999, 33.3,1.7,455H

And here's table2:
field1,field2
2,3
And the wanted query would make:
1998, 78.8, 101A 123G
1999, 33.3, 455H

Thanks
 
Ad

Advertisements

M

Marshall Barton

Ian said:
Thanks for any help.
I have a query and I would like to add to it a field that concatenates
fields from records it groups.
So the query is like:

Field: field1, field2, [table1.field3]*3/2
Table: table1, table1,
Total: Group By, Sum, Where
Sort:
Show:
Criteria:,,>=[table2].[field1] And <[table2].[field2]
or:

So this query groups and sums based on a conditional, but I would like to
add a field which takes all of the data of that field of records it groups
and puts in a field.

So for example here's table1:
field1, field2, field3,field4
1998, 53.2,1.5,101A
1998, 25.6,1.6,123G
1999, 33.3,1.7,455H

And here's table2:
field1,field2
2,3
And the wanted query would make:
1998, 78.8, 101A 123G
1999, 33.3, 455H


You need to create a function to do that. These are popular
examples:
http://www.mvps.org/access/modules/mdl0008.htm
http://www.rogersaccesslibrary.com/...Generic Function To Concatenate Child Records'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top