Sub-Form Appears Twice - Sometimes

N

Novice2000

Hi,

Does this ever get easy? I have a report which incorporates two sub-forms.
Everything seemed to be working fine, but as I scrolled through the reports I
ran across one that is showing the one sub-report twice. They don't all do
this, but some do. Anyone have an idea what could be causing this
duplication? Thanks.
 
N

Novice2000

Correction this is a Sub-Report not a sub-form. i can't figure it out why
would it appear twice on some reports and not on others?
 
M

Marshall Barton

Novice2000 said:
Correction this is a Sub-Report not a sub-form. i can't figure it out why
would it appear twice on some reports and not on others?


The usual reason is because the main report has two records
with the same value in the field that's used in the
subreport Link Master property.

Try opening the report's record source table query and
looking at the data records to verify that.
 
N

Novice2000

The report's record source is a query. I looked at the elements of the query
and removed anything that was unnecessary to the report. I checked for
duplication of fields in the query and didn't see any. It is still doing it.
Do you think it is a problem with the report or the query?
 
M

Marshall Barton

Novice2000 said:
The report's record source is a query. I looked at the elements of the query
and removed anything that was unnecessary to the report. I checked for
duplication of fields in the query and didn't see any. It is still doing it.
Do you think it is a problem with the report or the query?


This kind of problem is almost always in the query.

It might be easier to track it down if you can simplify
things as much as possible. Try to modify the main report's
record source query so it only retuens one or a few records
that demonstrate the problem. Then look at the query
records without using the report.
 
N

Novice2000

Do you mean rebuild the query from scratch and see which element is causing
the problem?
 
M

Marshall Barton

No. Just refine the query's criteria to make it return just
a few records that still exhibit the problem. Hopefully,
you will then be able to see the records that have the same
value in the linking field.
 
N

Novice2000

Hi,

I tried everything. I had saved an older copy of the query and it seems to
work. I think the problem might be with the joins. When I change the join
from the one table to the main table I get the duplication problem. Now all
I have to do is figure out why. It must be as you say a duplication of
records somehow. Thanks for your help.

Marshall Barton said:
No. Just refine the query's criteria to make it return just
a few records that still exhibit the problem. Hopefully,
you will then be able to see the records that have the same
value in the linking field.
--
Marsh
MVP [MS Access]

Do you mean rebuild the query from scratch and see which element is causing
the problem?
 
M

Marshall Barton

Novice2000 said:
I tried everything. I had saved an older copy of the query and it seems to
work. I think the problem might be with the joins. When I change the join
from the one table to the main table I get the duplication problem. Now all
I have to do is figure out why. It must be as you say a duplication of
records somehow. Thanks for your help.


It's starting to sound like the problem is that the main
report's record source is a query that joins two tables. If
so, then you will get this kind of issue if either of those
tables has more than one record that joins to a single
record in the other table. If that is an expected
situation, which is not at all unusual, then maybe you need
to change the main report to group on the joining field and
move the subreport to the group header/footer.
 

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