Problem with hyperlink (1 Viewer)

NotVeryTechie

Registered User.
Local time
Today, 22:39
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
 

Stockwell43

New member
Local time
Today, 16:39
Joined
Jun 30, 2008
Messages
4
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
Hi,

If all you want to do is open a folder from the form with a button, go into the buttons hyperlink field and add the hyperlink. No coding is necessary.
 

NotVeryTechie

Registered User.
Local time
Today, 22:39
Joined
May 20, 2008
Messages
54
Sorry, I don't understand. I have a button which allows the user to select the folder. Once the folder has been selected (path put into the hyperlink field) then they can come back on another day and click on the hyperlink field and get back to the folder. I can get the button to work and get the path into the hyperlink field, but I can't get the hyperlink field to 'link' to the folder.
 

Users who are viewing this thread

Top Bottom