Skip record giving empty recorsets in subrecords

  • Thread starter Thread starter GL
  • Start date Start date
G

GL

I use a report containing a subreport. For each record on the report
a query provides on the subreport a set of matching records
according to certain criteria.
For many records the subreport query results on empty recordsets. D
you have any idea how can I force the report to show and print onl
the records which give non empty recordsets on the subreport

G
 
This can be done. Since we don't know anything about your table structures,
assume a table of families and a related table of pets. The pets table
(tblPets) has [FamilyID] field that links the pet to a particular record in
tblFamilies. You can create a totals query like:

SELECT FamilyID
FROM tblPets
GROUP BY FamilyID;

Save and add this query to your report's record source query and join the
FamilyID fields. This will eliminate any families without pets.
 
Back
Top