Rabu, 28 Desember 2011

[MS_AccessPros] Calculated field?

 

Hi,

I can see that I will definitely need assistance on this. Can someone talk me through this?

I have a report (Reed's Report)with four fields Current, Last Month, Total and Average. I have a table (tbleunitmonthmileage)that contains all the mileage by Unit, YearMonth, Mileage and I have a query Querytblunitmonthmileage

SELECT T1.[Unit], T1.YearMonth, T1.Mileage - NZ(T2.Mileage, 0) AS Miles FROM tblUnitMonthMileage AS T1 LEFT JOIN tblUnitMonthMileage AS T2 ON (T1.[Unit]=T2.[Unit]) AND (T2.YearMonth = IIf(Right(T1.YearMonth, 2) = "01", Format(CInt(Left(T1.YearMonth, 4)) - 1, "0000") & "12", Left(T1.YearMonth, 4) & Format(CInt(Right(T1.YearMonth, 2)) - 1, "00")));

How do I use/direct the information from tblunitmonthmileage or the query to the fields I have in Reed's Report? The query shows the mileage by actual miles traveled every month with a beginning odometer reading, the table show the mileage as a monthly odometer reading.

on the report:Current is the current mileage for the month (odometer reading)
Last Month is the mileage for the previous month (odometer reading)
Total is Last month-Current
Average needs to take all the mileage for that unit from the last 12 months and average it and project it based on the average to a month in the future. This will tell me what month the unit will need to be replaced based on usage.

Thanks,

Tiffany

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar