Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / August 2006

Tip: Looking for answers? Try searching our database.

Link to open text file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony E. Scandora, Jr. - 31 Aug 2006 04:21 GMT
I need to link a table to a text file that is always open as a service log
file.  This is for read-only reporting, and I don't care if the file changes
after I open the table.  I tried to link to the file, but Access refused.

How can I link to an open text file?

Thanks,
Tony Scandora
Tony at AES Systems Corp dot com
John Nurick - 31 Aug 2006 07:18 GMT
Hi Anthony,

I have a feeling this isn't possible and that Access requires exclusive
access to the text file it links to. One work-round would be to make a
temporary copy of the file and link to that. I don't know whether the
VBA FileCopy statement is capable of copying an open file; if not, you
can use Shell() to call XCOPY.

>I need to link a table to a text file that is always open as a service log
>file.  This is for read-only reporting, and I don't care if the file changes
[quoted text clipped - 5 lines]
>Tony Scandora
>Tony at AES Systems Corp dot com

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Ken Snell (MVP) - 31 Aug 2006 14:02 GMT
> Hi Anthony,
>
> I have a feeling this isn't possible and that Access requires exclusive
> access to the text file it links to. One work-round would be to make a
> temporary copy of the file and link to that. I don't know whether the
> VBA FileCopy statement is capable of copying an open file;

No, the file must be closed for FileCopy to work on it.
Signature


       Ken Snell
<MS ACCESS MVP>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.