Access Report Calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to perform a calculation in a report which divides the total number of
miles by the total time taken to travel them. I am using the formula [total
miles]/[total time] where time is formatted at HoursandMinutes. My result is
an error# message.
 
What do you mean "where time is formatted as hoursandminutes?

What kind of field is this?

If it is a Date/Time field, then there is no such format. Time passed is a
DURATION and must be stored in a numeric field. (as total minutes) in order
for this to work.

After calcualted (using minutes elapsed) you can format the result to get
hours and minutes.


Rick B
 
Note: To format your result as hours and minutes, use the following:

=[SomeFieldName]\60 & Format([SomeFieldName] Mod 60, "\:00")

You could replace [SomeFieldName] with ([totalmiles]/[total time]) if you
want to accomplish all this in one field on your form.

Rick B
 
Back
Top