How to build database to calculate car transport costs?
How can I create database in access to calculate the cost of transport for a car. There should be a form where the user can click an origin city and origin state and a destination city and destination state. Then the form should pop out a price of transport for the user. If you don't know exactly how to do this, how could I go about starting to do this or where else could I look for help? THANK YOU!
Public Comments
- In your table of cities make sure that the latitude/llongitude of each city is stored. Then when the users pick their start/destination cities the computer can use the coordinates to calculate the distance between them using basic geometry. Then you use the gas-mileage of your car (which can be a constant value in your form) to compute how much it would cost to travel that distance. If you want to take this further, you can make a seperate table of cars with their respective mileages, and make it so that the user can pick their car on the form when they're picking the cities.
- Any program that computes distance based on latitude and longitude will be so wildly inaccurate, it's not worth the effort. It assumes that all roads are straight lines. On the other hand, it will take you a lifetime to record the road distance between every city in USA. Much easier to use Google Maps, and do a simple multiplication of mpg. Sorry to be so negative, I just think this is a pointless task for Access. There are much better projects you could be doing.
Powered by Yahoo! Answers