Polling the Google Maps API from VBA - possible?


Hi all,

I want to integrate Geocoding into an Access file, but I'm not sure if this is even possible. I honestly do not know much about Web programming, so I might be missing something fundamental.

Here's a document detailing how to get geocoding information from Google Maps using HTTP:
http://www.developer.com/db/article.php/3621981

Any pointers you can give me on how to approach this would be great. Or just telling me that there's no way to accomplish this from within VBA

Bani


Sponsored Links:



is their a way to create multiple google map markers on an embedded browser within a form just by altering the url thats passed to it

their are solutions but all seem to work only if you running the google map api which im not




Hello! I'm looking to create a google map link from a table- the table will have numerous entries that will all need to be added to the google map. Fields (for example) are address, city, state, zip and I'm looking to create the map through a form button with vba code. If someone could tell me how to go about this, I would greatly appreciate it. Thanks so much...




Hi

I have an Access Database where I have a textbox on a form where the user types in a postcode.

I have a webpage written in HTML that has a textbox where the user types in a postcode which retrieves a Map for the postcode using the Google Map API.

What I need to know is, can I get the contents from the Access TextBox and export it to the TextBox on the on the webpage using some kind of QueryString.

I know how to open the Webpage within my Access Form but I just need some clues on how to pass the contents of the string so that the user does not have to enter the postcode twice.

Many Thanks for any ideas however small

Regards

Tony




I was admiring the Google Maps application here http://www.access-programmers.co.uk/...le+Maps+access posted by ChrisO and was wondering how I can add my new streets and locations in Zambia, Africa.

I tried to locate local a few places but could not get specific or no required results at all.

I will appreciate.




I recently added a function to my DB that calculates road miles between two zipcodes using the Google Maps API.

That part is working great however I wanted to cache the results in a table so the code doesn't have to go out into the internet every time.

Every time the SQL insert statement fires I get the following:
Error #: 2486|Error Desc:You can't carry out this action at the present time.

I think it's because I'm using the function in a query to calculate multiple zip codes at once and the table or the DB is getting locked up but I can't seem to be able to overcome it

Thanks in advance for any help anyone can provide!




Hello :-)

I'm programming with accesss 2003 a few lines and I have an issue with the wbbWebsite Activex (wbbWebsite.Navigate URL:=Weblink). I build a database with 6000 postal codes, yes another postal code question... But not the usual one! I'm calling a google map based on the postal code choosed by the user, but everytime that I'm doing so, it seems that in the background a new instance of IE7 is opened and therefore, increasing the page file memory used.

I know that there is a "Unload" in the Google Maps API, but like I said, I'm using the ActiveX wbbwebsite. Is there a few lines of code that could kill the actual web browser instance opened, before loading a new one?

Rene




Hi Everyone,
Hope you can help and thanks in advance for any replies.

I have a DB for our Church Hamper Service and I need to be able to check addresses using Google maps or something similar, I have searched the Forum but can't find what I need. Using MS Access 2010

I want to be able to lookup the addresses of a client but find a route, we just need to confirm the address as we are a fixed point i.e. everything is sent from us.

Also want to keep as simple as possible as some of the volunteers are not computer literate.

The DB will be used by up to 8 people per month and I have checks in place to stop any deletions etc.

Thanks




Dear all,

I need some help and advice using VBA to create a URL.

I want to plot several points on Google Maps. The URL I am trying to create is this:-

http://maps.googleapis.com/maps/api/...G&sensor=false

String:-

http://maps.googleapis.com/maps/api/staticmap?zoom=12&size=800x800

Variables:-

&markers=color:yellow%7CLS11+8QY
&markers=color:red%7CLS10+1AZ
&markers=color:red%7CLS11+7HG

String (ending):-

&sensor=false

This plots three points on a map. I have created the above manually but I can't figure out how to get access to create it. I have a table that stores address/postcode data:-

[tbladdress].[postcode]

LS11 8QY
LS11 7HG
LS10 1AZ

How do I turn the three postcodes (above) into the url above using vba?

It's basically a string function but I do not know how to loop(?) the three records into one continuous string. I have searched and searched but I can't find the answer. Any help or guidance would be greatly appreciated.

Cheers




Hello, I was wondering if it's any way possible to capture image of google maps somehow (based on link or address) and have the image pasted into my word document via vba that's also generated inside the database which fills couple of fields on word template file and saves it to specific folder.

Thanks.




Hello,

I'm currently working on a small database for my company containing a list of suppliers/services and their information. One of the information fields is a distance field, which allows people in the company to search for approved suppliers/services within a certain distance from the company.

I actually have working code for this using both Bing Maps API and Google Maps API. Basically, I have a button with a VBA script that reads in an address from the table, accesses Bing API, extracts the distance from the generated XML file (if it fails to find one, run Google API) and puts it into another field in the table. It will only try to get a distance if there isn't already one. The problem is this implementation breaks ToS for both Microsoft and Google since
1) the application works over an intranet and is not accessible on a public website,
2) it uses an automated script
3) it does not display Bing Maps or Google Maps.

So my question is simply this: Does anyone know of another API or some other method for getting distances between two addresses where I wouldn't be breaking any ToS. Or, is Microsoft/Google likely to even notice/care since I only have 300 records in total and there probably won't be any massive additions?




Hi,
I want to add a field to my access form which is linked to Google Map with our office location set as default location and the field will shows mileage to the client address.
I know I can use a code to link to google map, but all I am interested in is the mileage # from our location to the client location.
Thanks in advance




I have just posted a blog in MS Access hints and tips here: Sending Google Mail (Gmail) from MS Access, VBA, Excel, Word...

Escape From Outlook
Microsoft tightly combine their applications together however sometimes it’s nice to escape from Microsoft Products and use others. Here I demonstrate how you can use Google Mail to send out an e-mail from an Internet connected PC, and you can also do this covertly!
This Example is From:
Windows® XP Under the Hood, Pg. 266 Chapter 6 Messaging and Faxing Objects
Extract
This basic example sends a simple, no-frills text message every time the script is run: Example File: script0603.vbs As you can see, the original file was a VBScript file; I have converted this to VBA.

Google e-mail Account
I have also set up a Gmail account to send the emails through. You are welcome to use this account for testing, however I suggest you set up your own Gmail account and change the hard coded information where necessary if you intend using this code for your own purposes.

Gmail From MS Access (the Video)
Can't show the video here!

Text from the above Video
This video is of a demo MS Access database which shows you how to send an e-mail from Google mail using
VBA. Press the “Send a Test Email” button and wait and then you get this message saying that the message sent is "True". It doesn't necessarily mean the message has been sent, it just means the code operated successfully. It is not necessary to have that confirmation message appear, this can be hidden, hence you have the ability to send email from your application covertly!




Hi Guys,
is it possible to have a textfield, and when i enter data will grab the addresss from google maps, with autocomplete... not showing maps, only address

Thanks
Let me know




I am trying to update a check box on the form from VBA code and it is not happennig. The code is as follows:


	Code:
	DoCmd.RunCommand acCmdRefresh
DoCmd.SetWarnings False
Dim rs As New ADODB.recordSet
Dim strSql As String
Dim cmd As ADODB.Command
Dim Userid As String
Dim NewUser As String
Dim count As Integer
Dim currentDate As String
Dim clientMessage As String
Dim clientSubject As String
Dim cm1 As String
Dim cm2 As String
Dim cm3 As String
Dim invheader As String
Dim e As String
Dim flag As String
Dim con As ADODB.Connection
Set con = New ADODB.Connection
con = CurrentProject.Connection
e = Chr$(13)
flag = True
 
currentDate = CStr(Date)
Userid = [Forms]![FRM_Shippers_Past_Due]![Userid]
 
    strSql = "SELECT [TBL_E-Mail_Shippers].E_Mail_Sent, [TBL_E-Mail_Shippers].Select,
             "TBL_Select_Shippers.* " & _
            "FROM [TBL_E-Mail_Shippers] " & _
            "INNER JOIN TBL_Select_Shippers ON [TBL_E-Mail_Shippers].CTC_SYS_NR = TBL_Select_Shippers.CTC_SYS_NR " & _
            "WHERE ((([TBL_E-Mail_Shippers].[Select])=-1) AND (([TBL_E-Mail_Shippers].Network_ID)= " & "'" & Userid & "'" &
"));"
            '"WHERE ((([TBL_E-Mail_Shippers].E_Mail_Sent)=0) AND (([TBL_E-Mail_Shippers].[Select])=-1) AND
(([TBL_E-Mail_Shippers].Network_ID)=[Forms]![FRM_Shippers_Past_Due]![Userid]));"
 
    count = 0
    rs.Open strSql, CurrentProject.Connection
 
    Do While Not rs.EOF
 
 'string extraction
 
        If rs!E_Mail_Sent = 0 Then
 
            Call FnTestSafeSendEmail(collectorEmail, EmailSubject, clientMessage, supervisorEmail, BCCEmail)
            [Forms]![FRM_Shippers_Past_Due]![E_Mail_Sent] = -1
            rs.MoveNext
            count = count + 1
            Else
            rs.MoveNext
       End If
 
    Loop
        MsgBox CStr(count) & " records emailed"
    rs.Close
    Set rs = Nothing   
End Sub

I am trying to update the field [Forms]![FRM_Shippers_Past_Due]![E_Mail_Sent] = -1 once the email is sent.

[Forms]![FRM_Shippers_Past_Due]![E_Mail_Sent] updates [TBL_E-Mail_Shippers].E_Mail_Sent

[TBL_E-Mail_Shippers].[Select] gets the input from the form.

User updates this field form the from to select the records to be emailed.

Right now its only updating only one record and I want to update multiple records. Thanks




Is it possible to control the default value of a table from within VBA?

I have a field in a table that requires a different default value, depending on where the database is being used. However I want to make it as easy as possible to for the user to change this value (within bounds).

I have a table that holds a single record, the potential default value for a number of other records in other tables. Can I retrieve this data and use it as the default value for these other tables, either in a form or on opening the database?

Alternatively, is it possible to control the defaul value of tables at the most basic level? E.g: I know that it is possible to create or modify a table using SQL, but it is possible to set the default value of a table using SQL too?

I figure that using the SQL route (if at all possible) would be the easier but I am not experienced enough in either SQL or VBA to know where to start on either option.

Tim




Hello,

Is it possible to call from VBA access a webservice over a network?

I export from Access an XML file which is put on a server on the network. When it stays there I have to trigger a webservice on the server.

Can somebody help me with this?

Thanks in advance.

Nico




hi all
we have a query that produces a lot of delivery address all over the uk
and we are trying to map these on google maps from the postcode in the query
any ideas

i have seen a lot of websites using the method to show where there other office and members are etc..

regards

simon




I've seen forms before where they can show you a google map using the address data in the table to display the location

however, the ones ive seen, (about 4 or 5 different versions), only do it one by one.

I have a list of 1000 Postcodes and addresses, I need to export a google map with them all on pin pointed, is this possible?

It's something we need to do to see marketing coverage, and I dont want to do each address one by one!




After my post in the general forms (titled thank you) this Post might contradict me - You see after introducing myself I expressed that I've never had to post a topic because up to now all my questions have been answered, and I found the answer by using the search function. But now I'm afraid that I'm going to ask a question which looks to have been answered, but I am afraid I am not able to follow.

I would like to know how to add a Hyper link in my form linking the Post Code to Google Maps so that Google Maps shows the location of the post code

and

This may be to difficult for access to do BUT I would like it so when I click my post code (or a button linked to the postcode) it opens Google Maps and shows directions from my company's Workshop to the Post code in question

Thanks