[RESOLVED] followhyperlink question
I am making a database in access that first lets a user input a file into a form from a filepicker vb script. Then it copies this file into another directory. My problem is that I have another form that I would like to let the user click on the file and then it loads however this form only opens the filepicker application. Here is my code
Thanks
Re: followhyperlink question
VB Code:
Private Sub Document_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
Dim strFileName As String, strPath As String, strtotal As String, i As Integer
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
i = InStrRev(vrtSelectedItem, "\")
strFileName = Mid$(vrtSelectedItem, i + 1)
strPath = Left$(vrtSelectedItem, i)
strtotal = strPath & strFileName
Document = "G:\data\V\VE\VEA\Engineering Project Database\Project Files\" & strFileName
fso.copyFile strtotal, "G:\data\V\VE\VEA\Engineering Project Database\Project Files\" & strFileName
Application.FollowHyperlink "G:\data\V\VE\VEA\Engineering Project Database\Project Files\" & strFileName
Next vrtSelectedItem
Else
End If
End With
Set fd = Nothing
End Sub
sorry