M
Mike
How can I sum the total for this from each record in a form?
=miles(DLookUp("[LocationZIP]","Locations","[LocationID]=" &
[Forms]![Loads]![Stop
Order]!LocationID),DLookUp("[LocationZIP]","Locations","[LocationID]=" &
[Forms]![Loads]![Stop Order]!Text18))
I Tried Sum (...) but it didn't work. If you need to know Text18 is this.
=IIf([StopNumber]=1,[LocationID].Column(4),DLookUp("[LocationID]","LoadStops
","[ID]=" & [Forms]![Loads]![Stop Order]!ID & " And [StopNumber]= " &
[Forms]![Loads]![Stop Order]!StopNumber-1))
Thanks
=miles(DLookUp("[LocationZIP]","Locations","[LocationID]=" &
[Forms]![Loads]![Stop
Order]!LocationID),DLookUp("[LocationZIP]","Locations","[LocationID]=" &
[Forms]![Loads]![Stop Order]!Text18))
I Tried Sum (...) but it didn't work. If you need to know Text18 is this.
=IIf([StopNumber]=1,[LocationID].Column(4),DLookUp("[LocationID]","LoadStops
","[ID]=" & [Forms]![Loads]![Stop Order]!ID & " And [StopNumber]= " &
[Forms]![Loads]![Stop Order]!StopNumber-1))
Thanks