funwithaccess
Registered User.
- Local time
- Today, 05:11
- Joined
- Sep 5, 2013
- Messages
- 80
Hi all,
I am attempting to create a form (Access 2013) that will include buttons to open the hyperlink menu to add a hyperlink into a table. It works if you click "Ok" without issue, however, if you click "Cancel" or click on the "X" I get a "Run-time error '2501' - The RunCommand action was cancelled". This is obviously referring to the RunCommand in the VBA code. The code does not reference the cancel or close option of the hyperlink editing box. I don't know how to correct this error.
Also, is there a way to get the hyperlink to populate as the full network path and not the drive letter?
As always, thank you in advance! This forum is one of the best out there.
Nate
I am attempting to create a form (Access 2013) that will include buttons to open the hyperlink menu to add a hyperlink into a table. It works if you click "Ok" without issue, however, if you click "Cancel" or click on the "X" I get a "Run-time error '2501' - The RunCommand action was cancelled". This is obviously referring to the RunCommand in the VBA code. The code does not reference the cancel or close option of the hyperlink editing box. I don't know how to correct this error.
Code:
Private Sub Command9_Click()
Me.[Hyperlink].SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
Command9_Click_Exit:
Exit Sub
Command9_Click_Err:
MsgBox Error$
Resume Command9_Click_Exit
End Sub
Also, is there a way to get the hyperlink to populate as the full network path and not the drive letter?
As always, thank you in advance! This forum is one of the best out there.
Nate