Grouping Issue

Ray Stantz

Registered User.
Local time
Today, 11:54
Joined
Nov 16, 2006
Messages
63
I have a database setup where the main form produces an autonumber which i use as the ID field to identify the record. There are also several other forms that i tie to the main form with the same ID number and the relationship is set to One To many to keep each main record and the subsequent records grouped together. Now i want to produce a report that is first Grouped by ID number and then shows all of the records associated with that Particular ID

So the report would look something like this (these are not actual field names):

ID: 12345

Related Form 1
ID 12345 Record#: 1 Name: Joe Smith Date: 4/1/07
ID 12345 Record#: 2 Name: Chuck Taylor Date: 4/15/07

Related Form 2
ID 12345 Record#: 1 Mileage: 516 Reimbusrement amount: $50.16

ID: 54321

Related Form 1
ID 54321 Record#: 3 Name: Mark Dupri Date: 3/11/07
ID 54321 Record#: 4 Name: Michelle Tracy Date: 5/3/07

Related Form 2
ID 54321 Record#: 7 Mileage: 516 Reimbusrement amount:
etc...

Instead I am Getting this on my report:

ID: 12345

Related Form 1
ID 12345 Record: 1 Name: Joe Smith Date: 4/1/07

Related Form 2
ID 12345 Record 1 Mileage: 516 Reimbusrement amount: $50.16

Related Form 1
ID 12345 Record: 2 Name: Chuck Taylor Date: 4/15/07


ID: 54321

etc.

Anyone know how i can get the records assoicated with the ID to group together under one header instead of repeating the header? Any help is greatly appreciated.

Ray
 
Can you do what you need with a sub-report?
 
I don't have any experience with sub reports, how would i go about setting one up? Is it the same concept as forms/subforms where i can just drag the subreport onto the main report? If so, i'll give that a try.
 
That didn't work the way i hoped, it grouped all records together regardless of the ID assigned to it. Any other suggestions?
 
Figured it out... I had to turn on the filter and use an expression in the subreport:

[Related Form1]![ID] = Reports![Report1]![ID]

Thank you for your help KenHigg!
 

Users who are viewing this thread

Back
Top Bottom