THERE ARE TWO PARTS TO THIS QUESTION:
Part 1: Right now I have a form that will upload, insert, and delete from the table. I would like to have the last textbox link to a hyperlink.
Using this code works for hyperlinks (see below and see this: Access - Hyperlinks Aren't Linking), but now I need to change the text to say something like "Open attachment" instead of the file location. For buttons, I know this is done by using ".Caption" but what is the code to change the text for a textbox and to keep the hyperlink I just inserted?
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogOpen)
With fd
.AllowMultiSelect = False
.Title = " Please select file"
If .Show = True Then
Selectfile = .SelectedItems(1)
Me.txtHyperlink = "#" & Selectfile & "#"
Else
Exit Function
End If
Set fd = Nothing
End With
Part 2: Whenever I insert the file path, the file also opens in another window. I want this to stop and to just link to the file and change the text box to say "Attachment", but also keep the link.