Minggu, 11 Desember 2016

[MS_AccessPros] MSAccess/VBA cannot find file on Mapped drive

 

Hi,


Strange issue.

I cannot determine if a mapped drive file exists.  Local files are OK with both methods. I've tried the 2 methods using the code below and both return false when the file really is there.

Ideas would be appreciated!!!

Thanks, 

WLRatGENOAGROUPdotCOM

DOS DIR <filename> Command shows file exists 


Code I've tried:
-- Using old VB method
Public Function IsFileThere(ByVal vFileName As String) As Boolean
    Open vFileName For Input As #1
    IsFileThere = True
IsFileThere_Exit:
    Close #1
    Exit Function
IsFileThere_Err:
    IsFileThere = False
    Resume IsFileThere_Exit
End Function
Returns error 76

--using FileSystemObject reference
Function FileExistsOnServer(ByVal FileToTest As String) As Boolean
    Dim fs As New Scripting.FileSystemObject
    With fs
        FileExistsOnServer = .FileExists(FileToTest)
    End With
End Function

Returns False


__._,_.___

Posted by: wlr@genoagroup.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar