Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dmax

Status
Not open for further replies.

Countymnca

Technical User
Jul 18, 2006
44
US
Hello,
I am having trouble getting the following to work on a report. Unit is a text field and I need the max value in the Ending column from the query to link with the unit number in the report.

=DMax("Ending","EndingMilesQry","'Unit' = '" & Reports!AvgMileagePerMonthByUnit.Unit & "'")

The report takes the ending mileage for each vehicle subtracts it from the replacement mileage amount and then divides it by the average mileage per month to see how many months are left before the car gets replaced.

 
Do you want to get the max value from the report? If so, just use:
=Max([Ending])
If the Max value must come from records outside the report's record source, try:
=DMax("Ending","EndingMilesQry","Unit=""" & Unit & """")

Duane
Hook'D on Access
MS Access MVP
 
Thanks...I figured that out last night as well. Overthinking things it appears.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top