Minggu, 11 Desember 2016

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

 

Bill-


If the file doesn't exist, Dir will return an empty string.  What happens if you do:

strSomething = Dir("I:\vccb\CCVC\DataFile\ClaimFiles\55724\")

??

That should return the name of the first file in that directory.

I just tried a similar command with a mapped drive, and it returned the first file in the folder.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Dec 11, 2016, at 6:23 PM, wlr@genoagroup.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Hi Bill,

I have tried Dir(FileName) and that returns false with either the mapped or UNC but I get a correct response with file name and file size in DOS using either the mapped drive and URL.  See DOS below

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Bill>dir I:\vccb\CCVC\DataFile\ClaimFiles\55724\161209150039-P109.PDF
 Volume in drive I is DOA
 Volume Serial Number is 8000-0439

 Directory of I:\vccb\CCVC\DataFile\ClaimFiles\55724

12/08/2016  06:13 PM           396,566 161209150039-P109.PDF
               1 File(s)        396,566 bytes
               0 Dir(s)  37,596,917,760 bytes free

Seems like a VBA issue but I'm stumped.

Also, I'm using a VPN via Cisco to map the drive to a remote server...

Thanks,  Bill Ross (I'm a Bill, too)





__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

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