KiLLm3rEd All American 1952 Posts user info edit post |
Made a form for work. Looking to have command button that will take the address information entered and take user directly to google maps with a map from our office to the customers house.
The address box is named address_Change()
I took turbo pascal in high school, but that is as far as my programing ability goes. Any help?
so far I've been able to find this on the net, but I need to get the address that the user has entered
" Private Sub GO_Click() Dim IE Set IE = CreateObject("InternetExplorer.Application") IE.navigate "http://maps.google.com/maps?f=q&source=s_q&hl=en&q=3769+Wilmington+Hwy,+Fayetteville,+Cumberland,+North+Carolina+28306&sll=37.0625,-95.677068&sspn=18.613243,35.859375&ie=UTF8&cd=2&geocode=Fe-FFQIdTu9M-w&split=0&ll=34.968757,-78.842225&spn=0.015263,0.022659&z=15" IE.Visible = True
End Sub
" 3/7/2009 2:52:26 PM |
cyrion All American 27139 Posts user info edit post |
just concatenate the string into that web address where the other one was using address.Text
from the looks of it you need to put + signs in between words to make it work perfectly . could always take the lazy route and Replace() all " " with a "+".
so something like...
Dim IE as InternetExplorer.Application Set IE = CreateObject("InternetExplorer.Application") Call IE.Navigate("http://maps.google.com/maps?f=q&source=s_q&hl=en&q=" & Replace(address.Text," ", "+") & "&sll=37.0625,-95.677068&sspn=18.613243,35.859375&ie=UTF8&cd=2&geocode=Fe-FFQIdTu9M-w&split=0&ll=34.968757,-78.842225&spn=0.015263,0.022659&z=15") IE.Visible = True
...well this seems to just show a location on googlemaps. same idea to plug in your office address im sure, but you'll need another param for that addy somewhere else (which you could just hardcode in. you get the point
[Edited on March 7, 2009 at 3:32 PM. Reason : .] 3/7/2009 3:25:58 PM |