A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Duplicate Data



 
 
Thread Tools Display Modes
  #1  
Old August 4th, 2009, 12:04 AM posted to microsoft.public.access.reports
iamnu
external usenet poster
 
Posts: 99
Default 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  
Old August 4th, 2009, 12:24 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default 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  
Old August 4th, 2009, 02:05 AM posted to microsoft.public.access.reports
iamnu
external usenet poster
 
Posts: 99
Default 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  
Old August 4th, 2009, 12:05 PM posted to microsoft.public.access.reports
iamnu
external usenet poster
 
Posts: 99
Default 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  
Old August 4th, 2009, 06:52 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.