RE: Comparison Report based on a query of only calculations.
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 1 Jul 2008 09:46:07 -0700
Use the report's sorting and grouping to group the herds by size. Create a
calculated field in the report's record source query using the function
below. Put the function in a standard module. In the query builder, it
would look something like this:
HerdSize: CowCount([NumberOfCows])
Then group by HerdSize in the report.
Public Function CowCount(lngHowNow) As Long
Select Case lngHowNow
Case Is <= 100
CowCount = 1
Case Is <= 500
CowCount = 2
Case Is <= 800
CowCount = 3
Case Is <= 1000
CowCount = 4
Case Else 'Herds over 1000
CowCount = 5
End Select
End Function
--
Dave Hargis, Microsoft Access MVP
"Amy Schmid" wrote:
Good morning,.
We have an access database that has the tables, forms and queries all
completed. We have a small portion of the data entered to test things out.
We need to create a report that is comparative by year and by number of cows.
We would like to have the number of cows be in groups as listed below:
Number of Cows:
0-100
100-500
500-800
800-1000
We are able to generate the report for each client correctly and in the
layout and design consistant with other reports from our database.
We are not sure how to set up a report that will compare Farm 1 with 500
cows to Farm 2 with 600 cows.
If you need more information, please let me know. I am not sure what all is
needed in order to get some guidence.
Thank you,
Amy
--
Still a Newbie, but learning :0)
- Follow-Ups:
- RE: Comparison Report based on a query of only calculations.
- From: Amy Schmid
- RE: Comparison Report based on a query of only calculations.
- Prev by Date: Re: Report Sort Order -- Blanks?
- Next by Date: Re: Open Report - using a selection made by combo box
- Previous by thread: Printing Individual PDF Reports
- Next by thread: RE: Comparison Report based on a query of only calculations.
- Index(es):
Relevant Pages
|