listing (via a single control) ids of related records

  • Thread starter Thread starter Julian Fowler
  • Start date Start date
J

Julian Fowler

Problem is of this form: two tables, A and B. A has primary key A.id,
B has primary key B.id and a foreign key reference B.Aref (one-to-many
relationship). I want to be able to generate a report that will
essentially list each record in A and for each of these the ids of the
records in B that reference this.

I can do this (trivally) to produce a report of the form:

A1
B1
B2
B3
A2
B2
B4
B6

etc. by use of a subreport to show the B's related to each A.
However, what I really want have is:

A1 - B1, B2, B3
A2 - B2, B4, B6

etc.

Any (relatively) simple way of doing this?

Julian
 
Julian said:
Problem is of this form: two tables, A and B. A has primary key A.id,
B has primary key B.id and a foreign key reference B.Aref (one-to-many
relationship). I want to be able to generate a report that will
essentially list each record in A and for each of these the ids of the
records in B that reference this.

I can do this (trivally) to produce a report of the form:

A1
B1
B2
B3
A2
B2
B4
B6

etc. by use of a subreport to show the B's related to each A.
However, what I really want have is:

A1 - B1, B2, B3
A2 - B2, B4, B6


You'll need to create a function to do that. There's
several available out there on the web, but here's a popular
one:
http://www.rogersaccesslibrary.com/...Generic Function To Concatenate Child Records'
 
Back
Top