Hey everyone. I am creating a databse and I would like users to be able to attach hyperlinks to documents on a server. I wrote the code
Private Sub attachment_Click()
Dim dialog As FileDialog
Set dialog = Application.FileDialog(msoFileDialogFilePicker)
With dialog
.AllowMultiSelect = True
.Show
Me!txtpath.Value = Replace(.SelectedItems.Item(1), ":\", ":")
End With
End Sub
This brings up a dialog box and then you select the document it will put the path in a txtbox that I have changed to hyperlink. When I click on the path hyperlink it does not bring anything up. If I click in the end of the path put a space and hit enter then the hyperlink will become clickable. It almost seems like I need to enter something in the txt box and hit enter before the link will start working. Any idea why this is?
Private Sub attachment_Click()
Dim dialog As FileDialog
Set dialog = Application.FileDialog(msoFileDialogFilePicker)
With dialog
.AllowMultiSelect = True
.Show
Me!txtpath.Value = Replace(.SelectedItems.Item(1), ":\", ":")
End With
End Sub
This brings up a dialog box and then you select the document it will put the path in a txtbox that I have changed to hyperlink. When I click on the path hyperlink it does not bring anything up. If I click in the end of the path put a space and hit enter then the hyperlink will become clickable. It almost seems like I need to enter something in the txt box and hit enter before the link will start working. Any idea why this is?