A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

open Map Quest from Form



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2008, 02:48 PM posted to microsoft.public.access.forms
billd
external usenet poster
 
Posts: 211
Default open Map Quest from Form

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.

  #2  
Old April 22nd, 2008, 07:35 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default open Map Quest from Form

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,Passwor dHere;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


"BillD" wrote:

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.

  #3  
Old April 22nd, 2008, 09:33 PM posted to microsoft.public.access.forms
billd
external usenet poster
 
Posts: 211
Default open Map Quest from Form

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.

  #4  
Old April 22nd, 2008, 09:36 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default open Map Quest from Form

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.

  #5  
Old April 22nd, 2008, 10:02 PM posted to microsoft.public.access.forms
billd
external usenet poster
 
Posts: 211
Default open Map Quest from Form

You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.

"Klatuu" wrote:

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.

  #6  
Old April 23rd, 2008, 02:48 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default open Map Quest from Form

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

"BillD" wrote in message
...
You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.

"Klatuu" wrote:

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.



  #7  
Old April 23rd, 2008, 06:30 PM posted to microsoft.public.access.forms
billd
external usenet poster
 
Posts: 211
Default open Map Quest from Form

Arvin:
Your directions were fantastic. I thought after responding to Dave H., that
I would not be able to do this feature without programming help.
I setup a command button on the form, copied your code into a double-click
event procedure. Changed "txtZipCode" to "Postal_Code" in 2 places.
Double-clicked on the Command Buttom and there was Map Quest with an area map
showing a red star where the postal code was located. WOW!
For your info - I only had to zoom-in once to have the street names show.
Thanks soooo.... much.
Bill D.
Here is the final code I used.
Private Sub cmdHyperlink_DblClick(Cancel As Integer)
Dim strPath As String
If Not IsNull(Me.Postal_Code) Then
strPath = "http://www.mapquest.com/maps/" & Me.Postal_Code & "/"
Me.cmdHyperlink.HyperlinkAddress = strPath
End If
End Sub

"Arvin Meyer [MVP]" wrote:

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

"BillD" wrote in message
...
You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.

"Klatuu" wrote:

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.




  #8  
Old April 23rd, 2008, 08:51 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default open Map Quest from Form

I'd already programmed something similar using MapPoint, so it wasn't much
of a stretch (actually it was easier) to use MapQuest. I might point out,
that the code relies on the way MapQuest sets their webpages. Any change in
their code may break ours.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"BillD" wrote in message
...
Arvin:
Your directions were fantastic. I thought after responding to Dave H.,
that
I would not be able to do this feature without programming help.
I setup a command button on the form, copied your code into a double-click
event procedure. Changed "txtZipCode" to "Postal_Code" in 2 places.
Double-clicked on the Command Buttom and there was Map Quest with an area
map
showing a red star where the postal code was located. WOW!
For your info - I only had to zoom-in once to have the street names show.
Thanks soooo.... much.
Bill D.
Here is the final code I used.
Private Sub cmdHyperlink_DblClick(Cancel As Integer)
Dim strPath As String
If Not IsNull(Me.Postal_Code) Then
strPath = "http://www.mapquest.com/maps/" & Me.Postal_Code & "/"
Me.cmdHyperlink.HyperlinkAddress = strPath
End If
End Sub

"Arvin Meyer [MVP]" wrote:

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

"BillD" wrote in message
...
You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.

"Klatuu" wrote:

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.






  #9  
Old June 6th, 2008, 11:00 PM posted to microsoft.public.access.forms
Anne
external usenet poster
 
Posts: 445
Default open Map Quest from Form

I found this thread and thanks to your help I have just added a link to Map
Quest on my Client Form. It is working fine on the first try but when I move
to another client it opens the original map again. How do I make it refresh
so each time I change clients it references the new postal code?
--
Anne


"Arvin Meyer [MVP]" wrote:

I'd already programmed something similar using MapPoint, so it wasn't much
of a stretch (actually it was easier) to use MapQuest. I might point out,
that the code relies on the way MapQuest sets their webpages. Any change in
their code may break ours.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"BillD" wrote in message
...
Arvin:
Your directions were fantastic. I thought after responding to Dave H.,
that
I would not be able to do this feature without programming help.
I setup a command button on the form, copied your code into a double-click
event procedure. Changed "txtZipCode" to "Postal_Code" in 2 places.
Double-clicked on the Command Buttom and there was Map Quest with an area
map
showing a red star where the postal code was located. WOW!
For your info - I only had to zoom-in once to have the street names show.
Thanks soooo.... much.
Bill D.
Here is the final code I used.
Private Sub cmdHyperlink_DblClick(Cancel As Integer)
Dim strPath As String
If Not IsNull(Me.Postal_Code) Then
strPath = "http://www.mapquest.com/maps/" & Me.Postal_Code & "/"
Me.cmdHyperlink.HyperlinkAddress = strPath
End If
End Sub

"Arvin Meyer [MVP]" wrote:

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

"BillD" wrote in message
...
You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.

"Klatuu" wrote:

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.







  #10  
Old December 4th, 2009, 01:34 AM posted to microsoft.public.access.forms
billd
external usenet poster
 
Posts: 211
Default open Map Quest from Form

Arvin:
Mapquest must have changed their code. My Mapquest button on the form does
not work anymore. The reason is that in Canadian Postal Codes there is a
space (ie. E3A 3N7). My data is stored this way. Mapquest used to accept this
format but not anymore. How do I delete the space in the hyperlink created
from the event on click (button on Form).
Your help would be greatly appreciated. Here is my code.
Private Sub cmdHyperlink_Click()
Dim strPath As String
If Not IsNull(Me.Postal_Code) Then
strPath = "http://www.mapquest.com/maps/" & Me.Postal_Code & "/"
Me.cmdHyperlink.HyperlinkAddress = strPath
End If
End Sub
"Arvin Meyer [MVP]" wrote:

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

"BillD" wrote in message
...
You're right, I don't think I would be able to do it.
Thanks again for your advice
Bill D.

"Klatuu" wrote:

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


"BillD" wrote:

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.

"Klatuu" wrote:

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,Passwor dHere;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


"BillD" wrote:

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.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.