Hyperlink Alias in form Textbox

zonexs123

Registered User.
Local time
Tomorrow, 03:25
Joined
Feb 6, 2011
Messages
39
Hi All,

I have an form with textbox (Text146) which is use for Hyperlink. I need to click command button to find the file and link it.

However its showing full path into the textbox (Text146) which I don't want user to know the path.

I would like to show only "Snapshot" word into the textbox (Text146) but it should open the selected file which I hyperlink it.

Here is my code:

Private Sub Command188_Click()
On Error GoTo ErrorHandler
Dim strFilter As String
Dim strInputFileName As String
Dim strSQL As String
If Len(Nz(Me.Text146, "")) <> 0 Then
MsgBox "You cannot add any more attachments"
Exit Sub
End If
strFilter = ahtAddFilterItem(strFilter, _
"All Files (*.*)", _
"*.*")
strInputFileName = ahtCommonFileOpenSave(Filter:=strFilter, _
OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
If Len(Nz(Me.Text146, "")) = 0 Then
Me.Text146 = strInputFileName
Dim origpath, newpath As String
Me.Text146.SetFocus
origpath = Me.Text146.Text
newpath = "S:\Operations\QA\MIS\MIS V1.0\QA Error Log\" & (Me.RefNo) & Right(Me.Text146, 4)
FileCopy origpath, newpath
Me.Text146 = newpath
End If
ErrorHandler:
If Err = 75 Then
MsgBox "You have not selected a file to attach to this Change Request"
ElseIf Err = 76 Then
MsgBox "You have not selected a file to attach to this Change Request"
End If
End Sub


Please advise as I am trying since last Monday but failed.
 
Anyone please help me here.... Any supporting link or file will work as I am unable to find anything related to this.

Many thanks in advance ......
 

Users who are viewing this thread

Back
Top Bottom