RunCommand動畵集-acCmdEditHyperlink 打開編輯超鏈接窗口,對超鏈接字段修改

2019-05-23 16:36:00
tmtony8
原創
300

access數據類型中,有超鏈接數據類型。當單擊一箇超級鏈接字段時,WEB瀏覽器或Access將根據超級鏈接地址到達指定的目標

通過字段穫取焦點,然後打開編輯超鏈接。可以對鏈接地址和鏈接文本進行修改。

  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


打開編輯超鏈接對話框,對超鏈接字段文本或者鏈接地址修改

    分享