manix
Registered User.
- Local time
- Today, 20:53
- Joined
- Nov 29, 2006
- Messages
- 100
Hi All,
I need some assistance. I have a txt box that records a hyperlink on a form. Now to save the user from having to input the file path manually, I have added a button that allows the user to select the file they want to link. The path is then recorded in the txt box.
This works fine, but once the file path appears in the txt box after selecting the file, it cannot be clicked on to open the file. It just seems to appear as a string of text and not a link.
Now if I manually type in or paste a file path, it remains a link and works when you click on it.
Why is this happening only when added through the button and dialogue box.
I have attached a picture of the form and here is the code I am using on the button.
I have used this code and button combination in another DB and it works without a problem!
I need some assistance. I have a txt box that records a hyperlink on a form. Now to save the user from having to input the file path manually, I have added a button that allows the user to select the file they want to link. The path is then recorded in the txt box.
This works fine, but once the file path appears in the txt box after selecting the file, it cannot be clicked on to open the file. It just seems to appear as a string of text and not a link.
Now if I manually type in or paste a file path, it remains a link and works when you click on it.
Why is this happening only when added through the button and dialogue box.
I have attached a picture of the form and here is the code I am using on the button.
Code:
Private Sub btn_addfilepath_Click()
Dim strfilter As String
Dim strInputFileName As String
strfilter = ahtAddFilterItem(strfilter, "All Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strfilter, OpenFile:=True, _
DialogTitle:="Please select file...", _
Flags:=ahtOFN_HIDEREADONLY)
Me.[File_Path] = strInputFileName
End Sub
Private Sub btn_removefilepath_Click()
Me![File_Path] = ""
End Sub
I have used this code and button combination in another DB and it works without a problem!