[Last Call] Learn how to a build a cloud-first strategyRegister Now


Access and Mapping Software

Posted on 2011-05-11
Medium Priority
Last Modified: 2012-06-21
I have built a dispatching database for a medical transport company.  They want to integrate it with Google Maps or MapPoint.  I only know Access and Excel VBA.  I know that MapPoint has a SQL Server component, but I don't know SQL Server.  Any thoughts on how I should proceed.  
Question by:Sasha42
LVL 40

Assisted Solution

als315 earned 800 total points
ID: 35743882
Try to search Google Maps API and MapPoint API. There are many examples and tutorials. May be one is your case.
LVL 65

Expert Comment

ID: 35744003
What are your intentions on using this. Is this to map a route or to show places based on zip code or something. You could try this way, not as elegant as coding using google maps api or something though

create a web browser control in your form then navigate to the url based on the zip code. Obviously you need the url (can test in browser, note url and build that). Use the .navigate method to load urls

Accepted Solution

AndreSterling earned 1200 total points
ID: 35744526
** This will open Google maps in IE **

Public Sub OpenGoogleMaps(strAddress1 As String, strAddress2 As String, strAddress3 As String, strAddress4 As String, _
                            strAddress5 As String, strFormName As String, strControlName As String)
    On Error GoTo HandleErrors
    Dim strLinkUrl As String ' address of provider passed to Googlemaps in the URL
    Dim strPath As String ' Google maps URL
    Dim strAddr() As String ' used to split up address string
    Dim strTest As String
    Dim strMsg As String
    Dim i As Integer
    strTest = RTrim(strAddress1) & RTrim(strAddress2) & RTrim(strAddress3) & RTrim(strAddress4) & RTrim(strAddress5)
    If Len(strTest) > 0 Then
        ' this is the URL to Google maps
        strPath = "http://maps.google.com/maps?q="
        ' setup the address URL to be passed by including the street, city and state
        'strLinkUrl = RTrim(strStreetAddress) & "+" & RTrim(strStreetAddress) & "+" & RTrim(strStreetAddress)
        strLinkUrl = RTrim(strAddress1) & "+" & RTrim(strAddress2) & "+" & RTrim(strAddress3) & "+" & RTrim(strAddress4) & "+" & RTrim(strAddress5)
        ' split up the address URL so that space between words can be removed.
        strAddr = Split(strLinkUrl, " ", , vbTextCompare)
        ' piece back each address together with "+"
        strLinkUrl = ""
        For i = LBound(strAddr()) To UBound(strAddr())
        strLinkUrl = strLinkUrl & strAddr(i) & "+"
        Next i
        ' remove the trailing "+" and include the Google map URL
        strLinkUrl = strPath & Left(strLinkUrl, Len(strLinkUrl) - 1)
        'Debug.Print strLinkUrl
        ' bring up Google maps passing the address
        Forms(strFormName)(strControlName).HyperlinkAddress = strLinkUrl
        strMsg = "First enter a address."
        MsgBox strMsg, vbCritical, ""
    End If
    Exit Sub
    Call ErrorHandler("basGeneral", "OpenGoogleMaps", "Code Line Number: " & Erl)
    Resume ExitHere
End Sub

Author Comment

ID: 35755006
als315 - I looked at the Google API. Will I be able to use it only knowing VBA?

rockiroads - that is exactly what I want to do. I want to be able to pin point several addresses at one time. I have a webrowser control on a form and I have the url. Don't know how to tie them all together.

AndreSterling - Thanks for the code.  I need it to work for multiple addresses that the vans are going to.

Thanks to all
LVL 40

Expert Comment

ID: 35756178
Here you can find good example for MS Access:
It is good for first step. With API you can do more.
I think you need Static Maps API:

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question