How do I insert a Hyperlink command from code in Access 2007

R

raveica

I'm trying to call the OpenHyperlinkDialog() defined below and I receive the
Error message:
Error 2046: The command or action 'insertHyperlink' isn't available now

The acCmdInsertHyperlink was selected interactively from the list constant
that specifies which built-in menu or toolbar command is to be run. How can i
make things working?


Call OpenHyperlinkDialog()


Public Function OpenHyperlinkDialog() As Boolean

On Error GoTo ErrorHandler_Error

DoCmd.RunCommand acCmdInsertHyperlink
OpenHyperlinkDialog = True

Exit_ErrorHandler:
Exit Function

ErrorHandler_Error:
Dim strSign As String
strSign = "()"
Call LogError(Err.Number, Err.Description,
"Form_subBudBasRent_OpenHyperlinkDialog" & strSign & "", , True)
Resume Exit_ErrorHandler

End Function
 

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