Edit Exisiting Hyperlink
acCmdEditHyperlink
Use this example to display the Hyperlink Dialog. It needs a text box named txtHyperlink with the code behind a command button called cmdEditHyper. txtHyperlink should be bound to a Hyperlink field in a table.
'***************** Code Start *******************
'Code by Terry Wickenden
Private Sub cmdEditHyper_Click()
'Opens hyperlink dialog
On Error GoTo ErrEditHyper
Me.txtHyperlink.SetFocus
DoCmd.RunCommand acCmdEditHyperlink
Exit Sub
ErrEditHyper:
Select Case Err
Case 2046
'Edit Hyperlink not available
MsgBox "You must be in a hyperlink field.", vbCritical, "Error Message"
Resume Next
Case 2501
'Cancel button selected do nothing
Resume Next
Case Else
MsgBox Err & vbCrLf & vbCrLf & Err.Description, vbCritical, "Error Message"
Resume Next
End Select
End Sub
'****************** Code End ********************