Edit Hyperlink

G

Guest

I have a form that has a data box that leads to a hyperlinked field in a
table. Is there a way to add a click button that will take me directly to the
edit hyperlink properties rather than having to left click the box and then
select hyperlink\Edit?
 
D

Dirk Goldgar

Natalie said:
I have a form that has a data box that leads to a hyperlinked field
in a table. Is there a way to add a click button that will take me
directly to the edit hyperlink properties rather than having to left
click the box and then select hyperlink\Edit?

"Left click"? Are you left-handed?

You could have a command button with the following event procedure:

'----- start of code -----
Private Sub cmdEditLink_Click()

On Error GoTo Err_Handler

Me.MyHyperlinkField.SetFocus
RunCommand acCmdEditHyperlink

Exit_Point:
Exit Sub

Err_Handler:
If Err.Number <> 2501 Then
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
End If
Resume Exit_Point

End Sub
'----- end of code -----

Use the name of your own hyperlink control in place of
"MyHyperlinkField", when adapting the above code.
 

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