If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Duplicate Data
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? |
#2
|
|||
|
|||
Duplicate Data
iamnu wrote:
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. -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Duplicate Data
On Aug 3, 5:24*pm, Marshall Barton wrote:
iamnu wrote: 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. -- Marsh MVP [MS Access] 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... |
#4
|
|||
|
|||
Duplicate Data
On Aug 3, 7:05*pm, iamnu wrote:
On Aug 3, 5:24*pm, Marshall Barton wrote: iamnu wrote: 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. -- Marsh MVP [MS Access] 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? |
#5
|
|||
|
|||
Duplicate Data
iamnu wrote:
On Aug 3, 7:05*pm, iamnu wrote: On Aug 3, 5:24*pm, Marshall Barton wrote: iamnu wrote: 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. 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? 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. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|