RichardP1978
Registered User.
- Local time
- Today, 05:57
- Joined
- Nov 14, 2006
- Messages
- 89
I am using the current code to browse for a filename, which gets inserted in to the relevant text box on a form.
Private Sub Command8_Click()
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.pdf)", "*.pdf")
'strFilter = ahtAddFilterItem(strFilter, "JPEG Files (*.jpg, *.jpeg)", "*.jpg;*.jpeg")
'strFilter = ahtAddFilterItem(strFilter, "bmp Files (*.bmp)", "*.bmp")
'strFilter = ahtAddFilterItem(strFilter, "all Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, _
OpenFile:=True, _
DialogTitle:="Choose a file...", _
Flags:=ahtOFN_HIDEREADONLY)
If Len(strInputFileName) > 0 Then
DocumentLink = strInputFileName
' Do something with the selected file
Else
'No file chosen, or user canceled
End If
End Sub
The problem is, the text that goes in the text box, does not work as a link. I get the finger cursor when I hover over it and it appears to format it correctly, (blue and underlined as per field type), but when I click on it, it does not do anything at all.
File names that I have manually done myself work ok.
Private Sub Command8_Click()
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.pdf)", "*.pdf")
'strFilter = ahtAddFilterItem(strFilter, "JPEG Files (*.jpg, *.jpeg)", "*.jpg;*.jpeg")
'strFilter = ahtAddFilterItem(strFilter, "bmp Files (*.bmp)", "*.bmp")
'strFilter = ahtAddFilterItem(strFilter, "all Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, _
OpenFile:=True, _
DialogTitle:="Choose a file...", _
Flags:=ahtOFN_HIDEREADONLY)
If Len(strInputFileName) > 0 Then
DocumentLink = strInputFileName
' Do something with the selected file
Else
'No file chosen, or user canceled
End If
End Sub
The problem is, the text that goes in the text box, does not work as a link. I get the finger cursor when I hover over it and it appears to format it correctly, (blue and underlined as per field type), but when I click on it, it does not do anything at all.
File names that I have manually done myself work ok.