Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba
Thread: Link to open text file

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Link to open text file
Anthony E. Scandora, Jr. 31.08.2006 03:21:02
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
Re: Link to open text file
John Nurick <j.mapSoN.nurick[ at ]dial.pipex.com> 31.08.2006 06:18:42
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.

On Wed, 30 Aug 2006 20:21:02 -0700, Anthony E. Scandora, Jr. <Tony at
AES Systems Corp dot com> wrote:

[Quoted Text]
>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 [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Re: Link to open text file
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 31.08.2006 13:02:49
"John Nurick" <j.mapSoN.nurick[ at ]dial.pipex.com> wrote in message
news:navcf2lddb4chnak20o0847krlr8i46e64[ at ]4ax.com...
[Quoted Text]
> 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.
--

Ken Snell
<MS ACCESS MVP>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net