I have a control button with the following code
It opens a browse window where you search for the file and then it places the path into the field called filepath ( Hyperlink type field)
but when I click the path in the field it does not link
Please help
Private Sub Command7_Click()
Dim retFiletext As String, dlg As Variant, s As String
Dim strImagePath As String
Dim retFile As Object
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.InitialFileName = CodeProject.path & "\Images"
If .Show = -1 Then s = .SelectedItems(1)
End With
If s <> "" Then
retFiletext = Right(s, Len(s) + InStrRev(s, "\"))
Me.filepath.value = retFiletext
End If
strImagePath = Me.filepath
End Sub
Thanks in Advance
It opens a browse window where you search for the file and then it places the path into the field called filepath ( Hyperlink type field)
but when I click the path in the field it does not link
Please help
Private Sub Command7_Click()
Dim retFiletext As String, dlg As Variant, s As String
Dim strImagePath As String
Dim retFile As Object
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.InitialFileName = CodeProject.path & "\Images"
If .Show = -1 Then s = .SelectedItems(1)
End With
If s <> "" Then
retFiletext = Right(s, Len(s) + InStrRev(s, "\"))
Me.filepath.value = retFiletext
End If
strImagePath = Me.filepath
End Sub
Thanks in Advance