UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 'Double Loop' in MS Access Report?    
 
   
yisraelharris
post Jun 3 2004, 05:58 AM
Post #1

New Member
Posts: 4



I need to write an MS Access Report which, for a given supplier record, first lists all invoice records for that supplier and then lists all branch records for that supplier. (Note that although invoice records and branch records are both related to supplier records, invoice records and branch records are in no way related to each other.)

If I only had to list all invoice records, I would know how to do it. But with this 'double loop', I have no idea where to start. Any ideas would be welcome.
Go to the top of the page
 
+
GatorzLair
post Jun 3 2004, 06:55 AM
Post #2

UtterAccess Guru
Posts: 666
From: Georgia, USA



Should be pretty easy. Simple Create a main report the returns the information you need for the Supplier such as name and address etc... Then create a subreprot that is filterd by the related info for the supplier to each of the tables.

You will have a Report with Two supreports.
Go to the top of the page
 
+
yisraelharris
post Jun 3 2004, 09:14 AM
Post #3

New Member
Posts: 4



Okay. Now how do I create a subreport? Based on your answer, I still don't see the answer to my question, namely, how to get it to list all of the supplier records and then below that all of the branch records?
Go to the top of the page
 
+
GatorzLair
post Jun 4 2004, 12:17 AM
Post #4

UtterAccess Guru
Posts: 666
From: Georgia, USA



Going on your statement that each table both the invoice and branch records have relationships with the supplier table.

1. Create a report either on the table of the supplier with needed information, or a query.(include the primary key in this report that ties the 3 table together. If you don't want this field visible you can hide it)

2. Use toolbox for reports and select supreport. Use a query that you have created for the information that you need to convey. With in the suberport wizard it will ask what criteria you wish to sort by this is where you are going to select the Primary key and foreign key for the two tables to filter by.

3. Repeat step 2 for the second subreport.

Hope this helps.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 05:27 PM