Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report with subreport keeps showing all records

Status
Not open for further replies.

microcrafters

Programmer
Oct 4, 2009
4
US
Hi, I currently have a form called Customers and it has a subform called Invoice which also contains two subforms called Parts and Payments.
Customers
-Invoices
--Parts
--Payments
this form works great. However I need to create a report that looks just like this form that will print only the record i have showing. the forms are links by the following fields

Forms!Invoices!CustomerID = Forms!Customers!CustomerID
Forms!Parts!InvoiceNumber = Forms!Invoices!InvoiceNumber
Forms!Payments!InvoiceNumber = Forms!Invoices!InvoiceNumber

(Note: i just wrote these relationships this way so you can understand what for and field is what)

If i link the report to Forms!Customers!CustomerID than the report will show only that cusomer but list all the invoices.

I simply want to print this form the way i see it with only the current records. and no matter what i try the form always prints all the records so i was told to do this through a report but the report does the same thing.

I've Included a pic of the form if that helps

Please Help
MicroCrafters
 
Check the links on your report to make sure your subreport parent child links are set up properly. If you look at the Link Child Fields and Link Master Fields for the sub report object, for your invoices report, for example, that will have just the name of each field. From what you put above, if your invoices report is called rptSubInvoices and your main report is called rptCustomer, then the properties of the rptSubInvoice in the rptCustomer report design should have a Link Child Fields of CustomerID and same for Master.

Just as a suggestion, I always put PK in front of primary keys in my table fields and FK in front of foreign keys. It makes it easier when you get to forms and reports to pick the fields you are linking up.

Please let me know if I am missing the point of your issue.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
I changed my approach to achieve a cleaner faster and easier solution. i was basing my report on the form causing me to create several subreports. instead i created a query using the same tables then linked the query to the form with a criteria. this way all the fields i needed where there and i had to make only one subreport. works great now.

thanks for the input.
MicroCrafers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top