Hello All,
My level is beginner but I am very grateful to pr2-eugin for posting some helpful code in a previous post
This concept works perfectly for my project but I know it will fail when I deploy my database as the resulting link is saved as a driveletter:\folder format. Because I have no control on how other users have shared drives mapped I would like someone to help me adjust the code in this sample to save the resulting hyperlink as a unc file path.
The relevant code is
Thanks in advance.
Gary
My level is beginner but I am very grateful to pr2-eugin for posting some helpful code in a previous post
This concept works perfectly for my project but I know it will fail when I deploy my database as the resulting link is saved as a driveletter:\folder format. Because I have no control on how other users have shared drives mapped I would like someone to help me adjust the code in this sample to save the resulting hyperlink as a unc file path.
The relevant code is
Code:
Private Sub CUST_FILE_Click()
Dim dd As Integer
If Len(Me.CUST_FILE & vbNullString) = 0 Then
'If there is a NO HYPERLINK FILES stored, then a prompt to select the file is provided.
Dim fileDump As FileDialog
Set fileDump = Application.FileDialog(msoFileDialogOpen)
dd = fileDump.Show
If dd = -1 Then
Dim Yourroute As String
Dim yourrouteName
Yourroute = fileDump.SelectedItems(1) 'here goes the route to your document
yourrouteName = StrReverse(Yourroute)
yourrouteName = StrReverse(Mid(yourrouteName, 1, InStr(yourrouteName, "\") - 1))
Me.CUST_FILE = yourrouteName & " # " & Yourroute 'the # sign is very important
Me.fileChangeBtn.Visible = True
Else
Me.CUST_FILE.SetFocus
Me.fileChangeBtn.Visible = False
End If
End If
End Sub
Thanks in advance.
Gary