Re: Passing textbox data into String for URL
- From: "ScubaSteve" <etter34@xxxxxxxxx>
- Date: 10 Jan 2007 11:07:12 -0800
Daniel,
Thanks so much for the response. I understand how that works, but now
I've run into a problem I think with the hyperlink. The way the
address is displayed in the hyperlink is with a + between each word.
So 111 + Pheasant + Lane .. etc. My txtaddress only shows 111 Pheasant
Lane.
So the URL would read
http://maps.google.com/maps?q=111 Pheasant
Lane+txtcity+txtstate+txtzip. Any way to insert + into the spaces of
the address so that it comes out right? Or any way to display this url
into another textbox? I tried to make a textbox with =[myGoogleMapURL]
in it and I get a #Name.
My code:
Private Sub CmdGet_click()
Dim strAdd As String
Dim strCity As String
Dim strState As String
Dim strZip As String
Dim MyGoogleMapURL As String
Dim strHypPre As String 'Google prefix url
Dim strHypCri As String
strAdd = Me.txtaddress
strCity = Me.txtcity
strState = Me.txtstate
strZip = Me.txtzip
strHypPre = "http://maps.google.com/maps?q="
strHypCri = strAdd & "+" & strCity & "+" & strState & "+" & strZip
MyGoogleMapURL = strHypPre & strHypCri
End Sub
This is on the patient subform of the tabbed record. And then on the
map tab, I have a button to pass this string to the webbrowser.
Private Sub cmdgotourl_Click()
Me.WebBrowser0.Navigate MyGoogleMapURL
End Sub
Again, thanks for your help!
.
- Follow-Ups:
- Re: Passing textbox data into String for URL
- From: Douglas J. Steele
- Re: Passing textbox data into String for URL
- From: ScubaSteve
- Re: Passing textbox data into String for URL
- References:
- Passing textbox data into String for URL
- From: ScubaSteve
- Passing textbox data into String for URL
- Prev by Date: Re: coding a command button to change properties on another form
- Next by Date: Re: Passing textbox data into String for URL
- Previous by thread: Passing textbox data into String for URL
- Next by thread: Re: Passing textbox data into String for URL
- Index(es):