Stop subreport from repeating

D

David K.

I've checked out some posts related to my problem but I'm just not getting it.

I've created two tables to record non conformances of parts made at our
company. The main table (tbl_NCMain) stores the basic job info such as
customer, PO #, part number, qty made, qty rejected, etc. The secondary
table (tbl_NCDetails) stores the specific defects that were discovered among
a batch of parts.

The tables are set up with a one-to-many relationship and related by the
NCNumber field. This way, one NCR may have only one type of defect or it may
contain several.

My problem is getting my report to display properly. It is currently set up
to display one NCR at a time using a filter and the Where code in VB. That
is working fine. I want to display each defect detail only once and I would
like to have up to three subreports displaying info in what I presume would
be the Detail section of the report.

I got it to work once but when I closed the program and came back the next
day the report was showing every DefectDetail entry (as planned) but also
showing the subreport the same number of times as there were numbers of
detail entries. Can't figure out how I did it originally. Make sense? I'll
show an example:

First, what I would like...

Page Header (everything works great here)

Under Detail Section
Defect #1 Dimensional Length is short by .012"
Defect #2 Plating Vendor plated parts with the incorrect
coating

Now, what I ended up with...

Page Header (everything works great here)

Under Detail Section
Defect #1 Dimensional Length is short by .012"
Defect #2 Plating Vendor plated parts with the incorrect
coating

Defect #1 Dimensional Length is short by .012"
Defect #2 Plating Vendor plated parts with the incorrect
coating

The subreport would repeat the same number of times as there were entries.
If I put it 6 types of defects then the report would show the subreport 6
times which is not what I want.

Any of this make sense? Do you need more info from me?
 
A

Armen Stein

On Tue, 28 Apr 2009 12:41:02 -0700, David K.

Hi David,

Your subreport should be in your report design only *once*. From your
description it seems that you've placed it in the design more than
once.

The child records related to the main record (defined using the Master
and Child Fields properties) will be all be listed in that one
subreport.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 
D

David K.

Hi Armen,

I got it to work but I don't know how to explain it properly. I will try it
again and write down the steps.

Thanks,
 

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