Link to home
Start Free TrialLog in
Avatar of SerinaStar
SerinaStarFlag for Australia

asked on

Trip Duration

Hi,

I have created a MS Access database which calculates the distance from one point to another. The result is given in Kilometers and Nautical Miles. Now what I need to do now is to calculate the time duration of the trip.

I know I can use the result of the kilometers to calculate the travel time, I just can't think of how and what would be the best way. At the moment I don't have the database recording the results of the distance calculations.

Any suggestions?

Cheers
SS
Avatar of pritamdutt
pritamdutt
Flag of India image

I don't know what is the purpose of this database, but you can calculate the time based on average travel speed.

e.g if travel speed is 20kmph then 40km = 2hrs travel time.
Avatar of SerinaStar

ASKER

The purpose it to calculate total shift times including travel to and from site. Do you know of a way to write that into a query?
You could create a VBA function in Access to calculate Trip time

e.g. CalculateTripTIme(DistanceTravelled,AvgSpeed)

and make call to that function in query

e.g. Select CalculateTripTime(DistanceTravelled,AvgSpeed)

where DistanceTravelled and AvgSpeed can be Table Fields.
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thankyou for explaining after reading you advise it all makes sence now...great advise!