• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 493
  • Last Modified:

Code to call the Edit Hyperlink Dialogue?

Access 2003.  You can open the Edit Hyperlink dialogue box by right-clicking on the hyperlink text box, then selecting Edit Hyperlink.

I want to call the dialogue box using the double click event.

Please could someone give me the syntax.

Many thanks

Mill
0
FJRMill
Asked:
FJRMill
  • 8
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Take a look at the DoCmd.RunCommand object

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Maybe:

docmd.RunCommand acCmdHyperlinkDisplayText

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
docmd.RunCommand acCmdOpenNewHyperlink

mx
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
One more:

DoCmd.RunCommand acCmdOpenHyperlink

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
**** Here it is:

DoCmd.RunCommand acCmdEditHyperlink

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Sorry ... took a while ...  I tested this and it works:

Private Sub Text20_DblClick(Cancel As Integer)
    On Error Resume Next
    DoCmd.RunCommand acCmdEditHyperlink
    Err.Clear
End Sub

mx
0
 
FJRMillAuthor Commented:
Magic!

Cheers mx  :-)

Out!
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You are welcome.

I KNEW it had to be one of the DoCmd.RunCommand's ..

thank you ...

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
btw

the On Error Resume Next

covers an error you will get if ... you just close the dialog w/o doing anything.

mx
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now