NotVeryTechie
Registered User.
- Local time
- Today, 14:51
- Joined
- May 20, 2008
- Messages
- 54
Hi there
I have created a button (Browse) which you click on to select a folder which is stored in a hyperlink field. The idea is that you can access the linked folder from the form. However, the button works fine, I can select the folder, but when I click on the hyperlink, nothing happens. What am I doing wrong?
Hope you can help
Here is the code I used (I found this on the internet)
Function fGetFileFolder() As String
Dim dlg As FileDialog
Set dlg = Application.FileDialog(msoFileDialogFolderPicker)
With dlg
.Filters.Clear
' .Filters.Add "All Files", "*.*"
.AllowMultiSelect = False
.Title = "Select a file to link"
If .Show Then
fGetFileFolder = .SelectedItems.Item(1)
End If
End With
Set dlg = Nothing
End Function
Private Sub butBrowse_Click()
Me.FOI_Attachment = fGetFileFolder
End Sub
I have created a button (Browse) which you click on to select a folder which is stored in a hyperlink field. The idea is that you can access the linked folder from the form. However, the button works fine, I can select the folder, but when I click on the hyperlink, nothing happens. What am I doing wrong?
Hope you can help
Here is the code I used (I found this on the internet)
Function fGetFileFolder() As String
Dim dlg As FileDialog
Set dlg = Application.FileDialog(msoFileDialogFolderPicker)
With dlg
.Filters.Clear
' .Filters.Add "All Files", "*.*"
.AllowMultiSelect = False
.Title = "Select a file to link"
If .Show Then
fGetFileFolder = .SelectedItems.Item(1)
End If
End With
Set dlg = Nothing
End Function
Private Sub butBrowse_Click()
Me.FOI_Attachment = fGetFileFolder
End Sub