Clicking Link freezes up Access

NearImpossible

Registered User.
Local time
Today, 12:17
Joined
Jul 12, 2019
Messages
225
I have a couple fields in my database that are clickable links, were the URL is entered into a different field and the link references that field.

URLField - Where the URL is entered
LinkField - Field that is clicked to open the URL

Code:
Private Sub LinkField_Click

     Application.FollowHyperlink me.URLField

End Sub

This has been working and launches the URL, but for whatever reason, now whenever I click the Link field, it does nothing and Access just goes Not Responding.

Is anyone else having this issue or having any suggestions to try??
 
after looking a little closer, it appears that only "HTTP://" URLs are affected whereas "HTTPS://" URLs are working just fine
 
Did they used to work?

Can try Shell command. Example:
Code:
Private Sub btnLink_Click()
On Error GoTo ErrProc
'FollowHyperlink is not working properly
''Application.FollowHyperlink Me.tbxLink
Dim wsShell As Object
Set wsShell = CreateObject("WScript.Shell")
wsShell.Run Chr(34) & Me.tbxLink & Chr(34)
Me.Title.SetFocus
ExitProc:
Set wsShell = Nothing
Exit Sub
ErrProc:
MsgBox "Cannot open document. Contact database administrator. : " & Err.Number
End Sub
 
yes, they used to work fine.

I've also tested this same URL in Excel and i'm getting the same results.

If I let it eventually time out and it comes up with Unable to open "URL". Cannot locate the internet server or proxy server

Wonder if its a Microsoft thing as it it works in LIBRA Office.

I'll try your code above and see what happens
 
Did they used to work?

Can try Shell command. Example:
Code:
Private Sub btnLink_Click()
On Error GoTo ErrProc
'FollowHyperlink is not working properly
''Application.FollowHyperlink Me.tbxLink
Dim wsShell As Object
Set wsShell = CreateObject("WScript.Shell")
wsShell.Run Chr(34) & Me.tbxLink & Chr(34)
Me.Title.SetFocus
ExitProc:
Set wsShell = Nothing
Exit Sub
ErrProc:
MsgBox "Cannot open document. Contact database administrator. : " & Err.Number
End Sub

It is working again, however if I don't have a URL in the Me.tbxLink field, it just opens Windows Explorer to This PC
 
Just out of interest, are you using Chrome as your default browser?

I ask as Chrome is now treating http sites (like my own current website) as insecure and such sites are slow to load.
Try changing your default browser (at least temporarily) to Edge or Firefox or even IE. Does that make a difference to the speed of loading?
 
Just out of interest, are you using Chrome as your default browser?

I ask as Chrome is how treating http sites (like my own current website) as insecure and such sites are slow to load.
Try changing your default browser (at least temporarily) to Edge or Firefox or even IE. Does that make a difference to the speed of loading?

Tried it in all 3 browsers with the same results, but I can copy and paste the URL and it works just fine.

Its just when clicking a link within Access or Excel as well

Junes code does work to launch the URL, however if no URL is specified, it opens windows explorer to This PC.
 
OK but for me there is a noticeable delay using Chrome (my default browser) but all the others are noticeably faster loading http sites. By comparison https sites load quickly in Chrome
 
Then add an If Then to conditionally run only if field has value.
 

Users who are viewing this thread

Back
Top Bottom