or here is how to put it on middle-click (L+R buttons at same time on 2-button mouse):
Private Sub controlname_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call GotoHyperlink_MouseMiddle(Button)
End Sub
Public Function GotoHyperlink_MouseMiddle( _
Button As Integer)
'181105 strive4peace
'call on MouseUp of a control
'if middle-click, navigate to URL
On Error GoTo Proc_Err
If Button <> acMiddleButton Then
Exit Function
End If
With Screen.ActiveControl
If IsNull(.Value) Then
MsgBox "URL is not specified", , "Can't go to site"
Exit Function
End If
Application.FollowHyperlink .Value
End With
Proc_Exit:
On Error Resume Next
Exit Function
Proc_Err:
MsgBox "Can't go to website", , "Note"
Resume Proc_Exit
Resume
End Function
kind regards,
crystal
Let's connect and work together!
http://msaccessgurus.com
instead of storing a hyperlink in the field, you can make it Short Text, 255 -- and use a form instead of the table directly. Then perhaps make the control double-click or right-click event (or a command button) do this:
with me.Controlname
if isNull(.value) then exit sub
application.FollowHyperlink .value
end withkind regards,
crystalLet's connect and work together!
http://msaccessgurus.com
On 5/2/2020 6:44 AM, anzus101 wrote:
Guys,
This is a simple problem; I hope you can help me solve it.
When I manually copy and paste an HTTP onto an ms access hyperlink field, the field DO redirect you to the site when clicking. If I import the HTTP sites from a crawler, when clicking on the field is not working.
Could you please help me to solve my problem. Thanks.
Tidak ada komentar:
Posting Komentar