Hi,
I am having trouble with getting an on click command button to work on my subform. When clicked it is supposed to run the hyperlink command. I've got the same code on my main form and works fine but on my subform you click the button and nothing happens. Can someone tell me where i'm going wrong? cheers.
I am having trouble with getting an on click command button to work on my subform. When clicked it is supposed to run the hyperlink command. I've got the same code on my main form and works fine but on my subform you click the button and nothing happens. Can someone tell me where i'm going wrong? cheers.
Code:
Private Sub Cmdhyperlink_Click()
On Error GoTo err_Cmdhyperlink_Click
Me.[TxtHyperlink].SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
exit_Cmdhyperlink_Click:
Exit Sub
err_Cmdhyperlink_Click:
MsgBox "Hyperlink cancelled."
Resume exit_Cmdhyperlink_Click
End Sub