This interface is the same
- in either case you are passing something to the browser to open Google maps in a browser
- their dev section should have any info on what you need to pass to them to get the location to show
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________
|I have looked at this page and it seems to relate to a webpage sending
| infomation to google maps where as I am sending a concecated text string.
|
| I will give you an example.
|
| Create a access form with text box called txtStefansBox
|
| Create a button called cboStefansButton
|
| The OnClick of cboStefansButton is
|
| Private Sub cboStefansButton_Click()
| Dim strStart As String
| Dim address1 As String
| address1 = Me.txtStefansBox
| strStart = address1
| Call GoogleMap(strStart)
| End Sub
|
| Create a new module called MyNewModule
| Paste in this
|
| Option Explicit
| Option Compare Text
| Public Sub GoogleMap(ByVal strStart As String)
| Dim strURL As String
| Dim IE As Object
| strStartingPoint = Replace(strStart, " ", "+")
| strURL =
| "
http://maps.google.co.uk/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=" &
| strStart &
| "&ie=UTF8&ll=53.443899,-3.158569&spn=0.695244,1.851196&z=9&iwloc=addr&om=0"
| Set IE = CreateObject("InternetExplorer.Application")
| IE.Navigate strURL
| IE.Visible = True
| End Sub
|
|
| Now when you put a postcode into .txtStefansBox and click cboStefansButton
| google maps will open with the postcode in the box. All you need to do is to
| click the button on the maps page and the pointer will go to that location.
|
| I am just trying to get rid of the last little button press on the page. OK
| maybe it's not possible from access
but worth a try.
|
| Oh by the way this is just so my users can view delevery addresss on a
| access form (I have linked it to a in-line web browser on the form)
|
| Many thanks (as I said this may not be possible and we will have to keep on
| just pressing the button)
|
|
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > You are running the code from Access to open IE (to the map area)
| > You'll need to see the Google Web API info at
| >
http://code.google.com/apis/maps/documentation/reference.html
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | Hi Stefan
| > |
| > | The vba works to get the string (address) and the module convert this and
| > | opens google and send the address into the text - no problems.
| > |
| > | I maybe just being a little pedentic as the google maps pages open and all
| > | you need to do is press the button on the page - but - I thought if it was
| > | possible to get google maps to open with the pointer on the map it would be
| > | better.
| > |
| > | I do not know anything about how google maps work but I am OK with parseing
| > | the strings from access and sending to anywhere in most formats so this bit
| > | works.
| > |
| > | It is's just the little button press at the end I can't get. Is there a
| > | code I can include in the string that I send to google that will activate the
| > | "button press"
| > |
| > |
| > | --
| > | Wayne
| > | Manchester, England.
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Where (what app) are you doing this?
| > | > If in a Web page you can't use the Access code (Me.CDStreet etc) you have now
| > | > - you need server side code to parse the form data
| > | > Show us the form html code and the receiving page VBscript parsing the form data
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Steve
| > | > |
| > | > | Sorry I misexplained (I will learn english better this year ;-)
| > | > |
| > | > | The module just convert the access text string into a format the google
| > | > | accepts
| > | > | It changes the &'s used to concenate in access into "+" so that a website
| > | > | will recoognise it.
| > | > |
| > | > | I can send the address to google no -problems but I just can't get the
| > | > | Submit Button "thing".
| > | > |
| > | > | I'm not sure how to do this. I have looked at the code on the google site
| > | > | and looks "very" strange to me. I you see some of my post to the FP forum
| > | > | you will note I am not good at web "stuff".
| > | > |
| > | > | Basically what I am trying to do is get the google map to open with the
| > | > | pointer on the map (like after you press the button on the page). I can send
| > | > | the address to the text box on the page it's just not opening the map with
| > | > | the pointer on it.
| > | > |
| > | > | Any ideas - osrry if I have not exlpain correct. If you want more
| > | > | information please ask.
| > | > |
| > | > | Thank you
| > | > | --
| > | > | Wayne
| > | > | Manchester, England.
| > | > |
| > | > |
| > | > |
| > | > | "Steve Easton" wrote:
| > | > |
| > | > | > Are you trying to run this "module" on a client from a web page,
| > | > | > or a module on a server, or a module in an application?
| > | > | >
| > | > | >
| > | > | > --
| > | > | >
| > | > | > Steve Easton
| > | > | > Microsoft MVP FrontPage
| > | > | > FP Cleaner
| > | > | >
http://www.95isalive.com/fixes/fpclean.htm
| > | > | > Hit Me FP
| > | > | >
http://www.95isalive.com/fixes/HitMeFP.htm
| > | > | >
| > | > | >
| > | > | > | > | > | > > Hi
| > | > | > >
| > | > | > > I have an access database with some address in and I want to click a button
| > | > | > > on the form and have the location shown up on a google map. Sorry if this is
| > | > | > > not an FP question but this is the only place I know the ask.
| > | > | > >
| > | > | > > I can get google maps to open and fill in the address in the box - the only
| > | > | > > thing I can't get is the "submit" (when you click the "Search Maps" button).
| > | > | > > Not really sure what that button does.
| > | > | > >
| > | > | > > The way I am passing the information to google is shown below - as I said
| > | > | > > this all works fine and opens google with the address box filled in - BUT
| > | > | > > does anyone know how to get the "submit" button actioned from an access module
| > | > | > >
| > | > | > > Thank you.
| > | > | > >
| > | > | > > 'Form Button is this'
| > | > | > > Private Sub cboAddressSearch_Click()
| > | > | > > Dim strStart As String
| > | > | > > Dim strEnd As String
| > | > | > > Dim address1 As String
| > | > | > > Dim address2 As String
| > | > | > > Dim address3 As String
| > | > | > > Dim address4 As String
| > | > | > > Dim address5 As String
| > | > | > >
| > | > | > > address1 = Me.CDStreet
| > | > | > > address2 = Me.CDStreet2
| > | > | > > address3 = Me.CDTown
| > | > | > > address4 = Me.CDPostcode
| > | > | > >
| > | > | > > strStart = address1 & " " & address2 & " " & address3 & " " & address4
| > | > | > > Call GoogleMap(strStart)
| > | > | > > End Sub
| > | > | > >
| > | > | > > This actions a simpe module
| > | > | > >
| > | > | > > Public Sub GoogleMap(ByVal strAddress As String)
| > | > | > > Dim strURL As String
| > | > | > > Dim IE As Object
| > | > | > > strStartingPoint = Replace(strStartingPoint, " ", "+")
| > | > | > > strURL =
| > | > | > > "
http://maps.google.co.uk/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=" &
| > | > | > > strAddress &
| > | > | > > "&ie=UTF8&ll=53.443899,-3.158569&spn=0.695244,1.851196&z=9&iwloc=addr&om=0"
| > | > | > > Set IE = CreateObject("InternetExplorer.Application")
| > | > | > > IE.Navigate strURL
| > | > | > > IE.Visible = True
| > | > | > > End Sub
| > | > | > >
| > | > | > > Thanks again if you can help - driving me mad this.
| > | > | > > --
| > | > | > > Wayne
| > | > | > > Manchester, England.
| > | > | > >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >