D
Dave
I want to be able to use a file select type dialog to attach a
hyperlink to a field
and have been using the code below. The problem is, that while it
selects the file corectly, when I click on the field it does not act as
a hyperlink.
My code is
Declare Function GetFileInfo Lib "msaccess.exe" Alias "#56" (FSI As
FileSelInfo, ByVal fOpen As Integer) As Long
Function fOpenFile(Optional strFile As Variant = Null, Optional
strFilter As String = "All Files (*.*)", Optional strDir As String =
"", Optional strTitle As String = "", Optional strButton As String =
"")
'Use to choose a file to open
Dim FSI As FileSelInfo
With FSI
.lngFlags = 0
.strFilter = RTrim(strFilter) & vbNullChar
.lngIndex = CInt("0")
If Not IsNull(strFile) Then
.strFile = RTrim(strFile) & vbNullChar
End If
.strTitle = RTrim(strTitle) & vbNullChar
.strButton = RTrim(strButton) & vbNullChar
.strDir = RTrim(strDir) & vbNullChar
End With
If GetFileInfo(FSI, True) = 0 Then fOpenFile =
fTrimNull(FSI.strFile)
End Function
hyperlink to a field
and have been using the code below. The problem is, that while it
selects the file corectly, when I click on the field it does not act as
a hyperlink.
My code is
Declare Function GetFileInfo Lib "msaccess.exe" Alias "#56" (FSI As
FileSelInfo, ByVal fOpen As Integer) As Long
Function fOpenFile(Optional strFile As Variant = Null, Optional
strFilter As String = "All Files (*.*)", Optional strDir As String =
"", Optional strTitle As String = "", Optional strButton As String =
"")
'Use to choose a file to open
Dim FSI As FileSelInfo
With FSI
.lngFlags = 0
.strFilter = RTrim(strFilter) & vbNullChar
.lngIndex = CInt("0")
If Not IsNull(strFile) Then
.strFile = RTrim(strFile) & vbNullChar
End If
.strTitle = RTrim(strTitle) & vbNullChar
.strButton = RTrim(strButton) & vbNullChar
.strDir = RTrim(strDir) & vbNullChar
End With
If GetFileInfo(FSI, True) = 0 Then fOpenFile =
fTrimNull(FSI.strFile)
End Function