The URL is simple:
http://www.mapquest.com/maps/32708/
is mine so do it as a string in code, use a command button named
cmdHyperlink with code like the following (txtZipCode being the name of the
textbox containing the ZipCode field.):
Private Sub cmdHyperlink_Click()
Dim strPath As String
If Not IsNull(Me.txtZipCode) Then
strPath = "
http://www.mapquest.com/maps/" & Me.txtZipCode & "/"
Me.cmdHyperlink.HyperlinkAddress = strPath
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.
:
You still have to contstruct the URL so it will pull up the map you want.
If
you can do that, you may try the FollowHyperlink method, but if you don't
know VBA, I don't think you will be able to do it.
--
Dave Hargis, Microsoft Access MVP
:
I thank you for the detailed response.
Unfortunately, I am not a programmer. I don't think I could change the
code
you sent to accomplish the task. Is there an easier way to accomplish
opening
a Map Quest area map from a field on a form called "Postal Code".
Thanks again,
Bill D.
:
First, you need to download the code at this site:
http://www.mvps.org/access/api/api0018.htm
The normal FollowHyperlink will thow up a security screen that is
annoying,
but this does not.
Then you need to experiment to determine how the URL should be
styled to
return the map you need. This will probably take a bit of tinkering.
Then
you can use the following as an example. In this code, I open Test
Director
with a user name and logon id and direct it to a specific task:
Private Sub cmdTestDirector_Click()
Const conHyperLink As String =
"testdirector:bootlyboos.corp.wingy.com:8080/" & _
"qcbin,DEFAULT,BingBanDevelopment,NameHere,PasswordHere;2:TaskNumberHere"
Dim strPwd As String
Dim strUser As String
Dim strhyperlink As String
strUser = GetUserID
strPwd = Nz(DLookup("[TestDirectorPassword]", "dbo_employee",
"[EmployeeLogin] = """ & _
strUser & """"), vbNullString)
If strPwd = vbNullString Then
MsgBox strUser & " Not Found in the Employee Table" &
vbNewLine & _
"Please contact an administrator", vbExclamation, "Stars"
Else
strhyperlink = Replace(conHyperLink, "NameHere", strUser)
strPwd = EncryptCode(1, strPwd)
strPwd = Replace(strPwd, "None", vbNullString)
strhyperlink = Replace(strhyperlink, "PasswordHere", strPwd)
strhyperlink = Replace(strhyperlink, "TaskNumberHere",
Me.txtTaskNumber)
Call fHandleFile(strhyperlink, WIN_NORMAL)
End If
End Sub
--
Dave Hargis, Microsoft Access MVP
:
I would like to open Map Quest from my records Form and have the
Postal Code
automatically inserted in Map Quest so I can then click on street
view and
have the map show the location with surrounding streets. Then I
could print
off the Map.
I would be using this to show where people in my database live. I
would only
need addresses for New Brunswick Canada.
Any help greatly appreciated.
Bill D.