Results 1 to 2 of 2
  1. #1
    dsajones is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2012
    Posts
    19

    FileExists Test Works for Me but NOT Colleague

    We're all currently working from home and I've hit some performance issues across our VPN when saving reports to server file shares. So to get round it for the moment I'm sending them to a folder on the local C: drive. I have a very basic test as follows:



    Code:
        
    
    OutPutPath = "C:\temp\"If FileExists(OutPutPath) Then
    ' Carry on
    Else
    'throw an error
    End If
    
    ' The fileexists function is.....
    
    Public Function FileExists(ByVal path_ As String) As Boolean
        FileExists = (Len(Dir(path_)) > 0)
    End Function
    On both my laptop and my colleague's there is definitely a folder called temp off the root of C: On my laptop it works perfectly but on my colleague's it fails every time with FileExists returning False. I'm completely stumped. Can anyone suggest anything?

    Incidentally, I have tried skipping the FileExists test and going straight in to the report output code but that goes straight in to debug as I guess it thinks the folder doesn't exist.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 06-21-2015, 07:58 AM
  2. Replies: 25
    Last Post: 11-23-2014, 02:43 PM
  3. Test String test besed on table data
    By igourine in forum Programming
    Replies: 3
    Last Post: 12-01-2013, 06:16 AM
  4. Error 3020 using fso.FileExists
    By usmcgrunt in forum Programming
    Replies: 1
    Last Post: 02-23-2012, 11:05 AM
  5. Keying in Test answers to Access DB from Written Test
    By CityOfKalamazoo in forum Access
    Replies: 3
    Last Post: 03-01-2010, 08:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums