Duplicate Data

  • Thread starter Thread starter iamnu
  • Start date Start date
I

iamnu

I have a MainForm with two SubForms. Both SubForms are linked to the
MainForm via PBID. The MainForm and SubForms work great.

MainForm uses table tblPhoneBook with a PBID (AutoNumber)
SubForm1 uses table tblNotes with a NotesID (AutoNumber) and a PBID
Number.
SubForm2 uses table tblPB with a DDID (AutoNumber) and a PBID Number.

I have a one-to-many relationship between tblPhoneBook and tblNotes.
I have a one-to-many relationship between tblPhoneBook and tblPB.

I am completely lost as to how to report on the data I have
collected. I have tried various combination's of SubReports to no
avail. I keep getting data repeated from tblNotes and tblPB, and I
just don't know why.

Can someone provide some insight?
 
iamnu said:
I have a MainForm with two SubForms. Both SubForms are linked to the
MainForm via PBID. The MainForm and SubForms work great.

MainForm uses table tblPhoneBook with a PBID (AutoNumber)
SubForm1 uses table tblNotes with a NotesID (AutoNumber) and a PBID
Number.
SubForm2 uses table tblPB with a DDID (AutoNumber) and a PBID Number.

I have a one-to-many relationship between tblPhoneBook and tblNotes.
I have a one-to-many relationship between tblPhoneBook and tblPB.

I am completely lost as to how to report on the data I have
collected. I have tried various combination's of SubReports to no
avail. I keep getting data repeated from tblNotes and tblPB, and I
just don't know why.


I suspect that your main report record source is a query
that includes the two other tables. The report and
subreport's record source should probably be nearly the same
as your form's record source.
 
I suspect that your main report record source is a query
that includes the two other tables.  The report and
subreport's record source should probably be nearly the same
as your form's record source.

You were correct! I took out the other two tables, and with some
additional work, it now works.
Thanks for guiding me in the right direction...
 
You were correct!  I took out the other two tables, and with some
additional work, it now works.
Thanks for guiding me in the right direction...

My report is just like it should be now, but for one final problem.
tblPB, which is now in SubReport2, has a field DirectoryID.
DirectoryID is needed on both the MainReport, and SubReport1 to
determine how to filter the report.

How do I get DirectoryID (and a few other related fields) onto the
MainForm?
 
iamnu said:
My report is just like it should be now, but for one final problem.
tblPB, which is now in SubReport2, has a field DirectoryID.
DirectoryID is needed on both the MainReport, and SubReport1 to
determine how to filter the report.

How do I get DirectoryID (and a few other related fields) onto the
MainForm?

If these "other fields" are not in the tblPhoneBook table,
then they can be different for each record in the table
tblPB. If they can be different, then it would not make
sense to try to display them in the main report.

OTOH, if these tblPB records all have the same field values
for a matching tblPhoneBook record, then these fields should
not be in table tblPB.

Unless I've misunderstood what you want, the above reasoning
leads me to think your problem can not and should not arise.
 
Back
Top