I have a Form that has a button named 'Hyperlink'. After clicking on this, I want it to browse to a certain folder location for file selection (a default path to browse). After selection, the complete file path will be feed into the text box (left side of the button in picture below). Below is the code that is not doing the need:
Private Sub cmdHyperlink_Click()
'Open hyperlink dialog box
On Error GoTo Err_cmdHyperlink_Click
'Set focus in txtDocLocation
Me.txtDocLocation.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
'Update date hyperlink was created
Me!txtLinkDate = Date
Exit_cmdHyperlink_Click:
Exit Sub
Err_cmdHyperlink_Click:
If Err.Number <> 2501 And Err.Number <> 13 Then
MsgBox "Error " & Err.Number & ": " & Err.Description, vbExclamation, _
"sfrmCaseDocs cmdHyperlink_Click"
End If
Resume Exit_cmdHyperlink_Click
End Sub
Any lead in this will be very helpful.
Thank you.