application.followhyperlink hangs Access application

C

Charlie O'Neill

When I use the following code Access 2007, running on Vista, hangs (not
responding).

Private Sub Tax_ID_Click()
Dim varX As Variant
Dim homePath As String

On Err GoTo errorHandler

varX = DLookup("[LC_Tax_ID2]", "[q_Homes w Tax]", "HomeID=
[Forms]![Members]![HomeID]")

homePath = "http://www.lakecopropappr.com/property-details.aspx?AltKey=" &
varX

Application.FollowHyperlink homePath
errorHandler:

MsgBox "Error trying to launch " & homePath & " webpage. Please ensure that
the URL you are trying to reach is correct", vbCritical, Error

End Sub

This code runs OK on my work computer W7 and does what is should. The work
computer runs on Windows Server 2003.

IE opens but does not receive the HTTP from Access, it becomes necessary to
use the Task Manager to close Access.

Charlie
 
M

Mark Andrews

I have seen that same behavior. I use this code instead of
application.followhyperlink

Public Sub OpenWebPage(url As String)

Dim browser As Variant

Set browser = CreateObject("InternetExplorer.Application")
browser.Navigate (url)
browser.StatusBar = False
browser.Toolbar = False
browser.visible = True
browser.Resizable = True
browser.AddressBar = False

End Sub
 
C

Charlie O'Neill

That's it!! It works perfectly, thanks, now maybe my hair will begin to grow
back.

Mark Andrews said:
I have seen that same behavior. I use this code instead of
application.followhyperlink

Public Sub OpenWebPage(url As String)

Dim browser As Variant

Set browser = CreateObject("InternetExplorer.Application")
browser.Navigate (url)
browser.StatusBar = False
browser.Toolbar = False
browser.visible = True
browser.Resizable = True
browser.AddressBar = False

End Sub

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

Charlie O'Neill said:
When I use the following code Access 2007, running on Vista, hangs (not
responding).

Private Sub Tax_ID_Click()
Dim varX As Variant
Dim homePath As String

On Err GoTo errorHandler

varX = DLookup("[LC_Tax_ID2]", "[q_Homes w Tax]", "HomeID=
[Forms]![Members]![HomeID]")

homePath = "http://www.lakecopropappr.com/property-details.aspx?AltKey=" &
varX

Application.FollowHyperlink homePath
errorHandler:

MsgBox "Error trying to launch " & homePath & " webpage. Please ensure
that
the URL you are trying to reach is correct", vbCritical, Error

End Sub

This code runs OK on my work computer W7 and does what is should. The
work
computer runs on Windows Server 2003.

IE opens but does not receive the HTTP from Access, it becomes necessary
to
use the Task Manager to close Access.

Charlie

.
 
D

De Jager

Charlie O'Neill said:
When I use the following code Access 2007, running on Vista, hangs (not
responding).

Private Sub Tax_ID_Click()
Dim varX As Variant
Dim homePath As String

On Err GoTo errorHandler

varX = DLookup("[LC_Tax_ID2]", "[q_Homes w Tax]", "HomeID=
[Forms]![Members]![HomeID]")

homePath = "http://www.lakecopropappr.com/property-details.aspx?AltKey=" &
varX

Application.FollowHyperlink homePath
errorHandler:

MsgBox "Error trying to launch " & homePath & " webpage. Please ensure
that
the URL you are trying to reach is correct", vbCritical, Error

End Sub

This code runs OK on my work computer W7 and does what is should. The
work
computer runs on Windows Server 2003.

IE opens but does not receive the HTTP from Access, it becomes necessary
to
use the Task Manager to close Access.

Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top