Results 1 to 2 of 2

Thread: [RESOLVED] followhyperlink question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    10

    Resolved [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

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    10

    Re: followhyperlink question

    VB Code:
    1. Private Sub Document_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.   Dim fd As FileDialog
    3.     Set fd = Application.FileDialog(msoFileDialogFilePicker)
    4.  
    5.     Dim vrtSelectedItem As Variant
    6.     With fd
    7.  
    8.            If .Show = -1 Then
    9.  
    10.                For Each vrtSelectedItem In .SelectedItems
    11.  
    12.              
    13.        
    14. Dim strFileName As String, strPath As String, strtotal As String, i As Integer
    15. Dim fso
    16. Set fso = CreateObject("Scripting.FileSystemObject")
    17.  
    18.  
    19.   i = InStrRev(vrtSelectedItem, "\")
    20.   strFileName = Mid$(vrtSelectedItem, i + 1)
    21.   strPath = Left$(vrtSelectedItem, i)
    22.   strtotal = strPath & strFileName
    23.  
    24.  Document = "G:\data\V\VE\VEA\Engineering Project Database\Project Files\" & strFileName
    25.  
    26. fso.copyFile strtotal, "G:\data\V\VE\VEA\Engineering Project Database\Project Files\" & strFileName
    27.  
    28. Application.FollowHyperlink "G:\data\V\VE\VEA\Engineering Project Database\Project Files\" & strFileName
    29.  
    30.      
    31.             Next vrtSelectedItem
    32.         Else
    33.         End If
    34.     End With
    35.  
    36.     Set fd = Nothing
    37. End Sub
    sorry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width