G
Gene C
Subject: Re: Table Design/Reports
From: "Gene C" <[email protected]> Sent:
9/25/2003 6:17:03 PM
Thanks for the information on designing the report. It
works well with 1 exception. It only works with multiple
reads but only with 1 location. We have multiple sites
The report we are trying to construct has multiple reads
associated with multiple locations (sites). When I
construct a report using your criteria I only get 1 site.
The report we are looking for would have headings of
Site Number
Date Read
Previous Reading
Current Reading
Difference
We certainly appreciate any help you may supply.
Thanks,
Gene
From: "Gene C" <[email protected]> Sent:
9/25/2003 6:17:03 PM
Thanks for the information on designing the report. It
works well with 1 exception. It only works with multiple
reads but only with 1 location. We have multiple sites
The report we are trying to construct has multiple reads
associated with multiple locations (sites). When I
construct a report using your criteria I only get 1 site.
The report we are looking for would have headings of
Site Number
Date Read
Previous Reading
Current Reading
Difference
We certainly appreciate any help you may supply.
Thanks,
Gene
-----Original Message-----
Gene,
There are probably several approaches to this. Here is one idea...
Make a query along these lines:
SELECT Min(Reading) AS PreviousReading, Max(Reading) AS
CurrentReading, Min(ReadDate) AS PreviousReadDate, Max (ReadDate) AS
CurrentReadDate FROM TableName
WHERE ReadDate In (SELECT Top 2 ReadDate FROM TableName
ORDER BY ReadDate DESC)
Then, base your report on this query, and for your Difference, put an
unbound textbox on the report with ControlSource set to...
=[CurrentReading]-[PreviousReading]
- Steve Schapel, Microsoft Access MVP