subreport is displaying different data !!!

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I have a very strange problem with a report.

I have a report that conatins one subreport.
What is strange is that sometimes the data that is shown
on the subreport does not belong to the data on the main
report. The subreport is linked with the main report
using the Link Child Fields and Link Master fields
properties, in this case here I am using 4 fields to make
the link. I have no idea why this is happening because
when you open the query that serves as the recordsource
for the report there is no problem.
Does anyone have any idea why this is happening?

Thanks.
 
Tell us a little more about the 4 fields in the
LinkMasterFields/LinkChildFields.

What data type are they? Are any of them calculated fields in the query, or
calculated controls on the report? If so, there is a good chance that Access
is not interpreting the data types consistently.
 
I have a couple of ideas (in order that I would check them.).

A deleted record can cause problems. Use repair and compact.

Are there more than one record in your querry that satisfies the criteria in
the master/child list? If so the first record found would be brought up.

A null propogating the fields can produce that. Either make sure you have no
nulls or use Nz().

Did you define the master/child links in VBA? Sometimes numbers need a
quote around them as in "FieldName = '" & ReferencedNumber & "'" (There is
a single quote after the =<space> and between the double quotes at the end.)

Hope one of those helps.
 
Back
Top