Driving distance calculation between two addresses that can be used in MsAccess

Is there an application that I can call from MsAccess that will return the driving distance between two addresses?
Lenny GrayAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
The short answer is yes.  The long answer is I don't have any examples.  I think either MapQuest or GoogleMaps will do this.  You just have to find the API call you need.  This one might do it.

https://developers.google.com/maps/documentation/distance-matrix/

I've attached a database that maps an address using a different API.  Put an address in any record first since I removed all the real data.
CaML2K-SanatizedDataMapquestAndGoogl.zip
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Just be aware that many of the main players (Google, Map Quest, etc) have restrictions on what you can do with their API's.  For most, it's a limit on the number of calls you can make in a 24 hour period.

 If it's a commercial product that your building this into, then you'll must likely need to purchase a license.

Jim.
0
Lenny GrayAuthor Commented:
Thank you for your quick reply.

I opened the database but it appears to be a membership database. How do i navigate to the address screens?
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

PatHartmanCommented:
Sorry,  click on members, then double click on any member ID.  Don't forget to put in an address.

The example is just to show you how to use one of these API.  I have two different ways to map an address.
0
Lenny GrayAuthor Commented:
Pretty slick!

I'll have to check with Google for a license for their API.

Do you have any idea what that would cost?
0
Jeffrey CoachmanMIS LiasonCommented:
Just FYI, ...If you just need this to show the mileage in a "Google Maps" window.
("On Demand")
You can do it easily with code like this:

Application.FollowHyperlink "https://www.google.com/maps/dir/" & Me.FullAddress1 & "/" & Me.FullAddress2

Open in new window


Create a form with two text boxes:
FullAddress1
FullAddress2
Then put the code on the click event of a button.

So, ...some something like this:
map form...will give you this:
map
You can break out the address components into separate textboxes if you like, ...but you have to concatenate them in the code individually.

I used something this to calculate my reimbursal mileage from our base location, to all our sites.

It will even take input like:
Kennedy Airport
Laguardia Airport

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lenny GrayAuthor Commented:
WOW!

Jeff, that's exactly what I am looking for - just the mileage not directions.

Is the code, that you included, the only code necessary to fetch the mileage value?

Does Google have limitations on this? I am trying to do something for the company that includes a mileage calculation between two points. There will be many users daily on this. Does the company have to buy a license from Google to use its mileage calculator?

Using lat and long of postal codes is not accurate enough. I need point-to-point.
0
PatHartmanCommented:
Each of the API's does something different.  I only did a quick scan and picked the one that looked like it returned a number rather than a map.  There may be other options.

Many uses are free for small numbers of transactions in a time period and others require a fee.  Google can help you figure this out.
0
Lenny GrayAuthor Commented:
Thank you!!
0
PatHartmanCommented:
Let us know which API you ended up with and the cost if wasn't free.  Also, don't forget to close the question.
0
Lenny GrayAuthor Commented:
Google rates are not that bad, in fact virtually free, unless you are going to develop a commercial application

Google rates are not that bad. It is actually free unless you are developing a commercial application.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.